Erlang/OTP Forums

Author Message

<  Advanced Erlang/OTP  ~  [x-post] Attempting to rewrite header; obstacles faced

bosky101
Posted: Fri Apr 25, 2008 5:38 am Reply with quote
Joined: 30 Oct 2007 Posts: 3 Location: india
[original cross post directed to erlyaws-list]
---------------------------------------------
Hey,


I have tried the following 3 methods to try and rewrite the headers (more specificaly the #headers{referer}

ATTEMPT1
hacked within yaws.erl, only to find that the Referer when edited, was only being used in yaws_log:accesslogs. ( http://paste.lisp.org/display/59461 )
Result: No change in arg structure , no change in document.referrer.

ATTEMPT2
tried setting within out(A) http://paste.lisp.org/display/59461#1
Result: No change in arg structure, no change in document.referrer.

ATTEMPT3
rewriting the referer, just as arg_rewrite rewrites path, but instead
return an Arg with different referer .
Result: interestingly this worked in editing the Arg record, and when asked to yaws_api:reformat_headers, to show the headers, it did show the newly set referer. But...no change in document.referrer.. : / . The browser's document.referrer still showed the old one. ( http://paste.lisp.org/display/59461#2 )

Please do have look into http://paste.lisp.org/display/59461 for the
snippets of the three attempts. My questions are ...

Q1. Is is possible to rewrite headers such as referer within yaws ?
Q2. Would you know of any explanation as to why the Arg showed referer as X, but the browser still takes Y. I've heard Apache2 (using curl) has support for manipulating request headers such as referrer,but i'm committed to doing the same in yaws as well.


Keep Clicking,
Bosky ( b101 on #erlang)
View user's profile Send private message

Display posts from previous:  

All times are GMT
Page 1 of 1
This forum is locked: you cannot post, reply to, or edit topics.

Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum