[httperf] Regarding adding http headers
Gayathri Ramakrishnan
httperf@napali.hpl.hp.com
Tue, 14 Aug 2001 17:02:15 +0530
Hi Martin,
I did try using the no-host-hdr option as well as adding
\n at the end of the the Host header, that I specfiy in
the add-header option. But, since I specify a no-host-hdr
the httperf adds a newline inbetween the user-agent and
the host header as a result of which I am getting a 404
error.
SH0:GET http://www.yahoo.com HTTP/1.1
SH0:User-Agent: httperf/0.8
SH0:
SH0:Host: www.yahoo.com
SS0: header 122 content 0
RH0:HTTP/1.1 404 Not Found
Can this newline be avoided ?
Regards,
Gayathri
"Martin F. Arlitt" wrote:
>
> Gayathri
>
> the Host header is included by default when using
> http/1.1 (which is also the default in httperf). I believe
> the problem is your httperf command below is actually
> sending the proxy two Host: headers. httperf will
> automatically add the header "Host: 192.168.100.77",
> and you are asking it to add "Host: www.yahoo.com".
> This is likely causing your proxy to become confused.
>
> if you want to send "Host: www.yahoo.com" rather than
> Host: 192.168.100.77", the --no-host-hdr option in
> httperf/0.8 will disable the default behaviour of including
> a Host: header; you can then specify the Host: header
> using the "--add-header" option.
>
> you should be able to simplify your command to:
>
> httperf --server 192.168.100.77 --port 2234
> --uri http://www.yahoo.com --print-reply --print-request
> --debug 3 --no-host-hdr --add-header "Host: www.yahoo.com"
>
> as the other options you specified are defaults. please note
> that while httperf may be used for testing various features
> (or performance) of proxies it is designed for testing Web servers.
> please be sure to carefully monitor the headers that are issued to
> ensure that you are evaluating the protocol compliance of the
> proxy and not introducing errors by utilizing httperf for a
> task it was not designed for.
>
> Martin
>
> Gayathri Ramakrishnan wrote:
>
> > Hi,
> >
> > We are using httperf for doing http complacence testing of one
> > of our servers. This server expects a "Host" header along
> > with the "GET" request in order to retrive the requested URI.
> >
> > How do I include this header using the httperf tool. I am aware
> > of the option called "add-header" in the tool. I tried using this
> > as follows.
> >
> > httperf --server 192.168.100.77 --port 2234 --num-conns 1 --num-calls 1
> > --uri http://www.yahoo.com --print-reply --print-request --http-version
> > 1.1 -debug 3 --method GET --add-header "Host: www.yahoo.com"
> >
> > but it doesn't seem to be retriving the page for me. But when
> > I try simulating the same thru telnet and issue a GET it works.
> >
> > telnet 192.168.100.77 2234 Trying
> > 192.168.100.77... Connected to
> > 192.168.100.77.
> > Escape character is '^]'.
> > GET http://www.yahoo.com HTTP/1.1
> > Host: www.yahoo.com
> >
> > HTTP/1.0 200 OK
> > Date: Thu, 09 Aug 2001 04:37:32 GMT
> > Content-Type: text/html
> > X-Cache: MISS from npd-proxy.hcltech.com
> > Proxy-Connection: close
> > X-Squid-Reserve:
> > X-Squid-MaxCount:
> >
> > <html><head><title>Yahoo!</title><base href=http://www.yahoo.com/
> > target=_top><m
> > eta http-equiv="PICS-Label" content='(PICS-1.1
> > "http://www.rsac.org/ratingsv01.h
> > tml" l gen true for "http://www.yahoo.com" r (n 0 s 0 v 0 l 0))'></head>
> > <script language="javascript">
> > function ch() {
> > .................
> > ....................
> >
> > Let me know how this problem can be solved.
> >
> > Thanks,
> > Gayathri
> >
> > --
> > To unsubscribe: echo unsubscribe httperf | mail majordomo@linux.hpl.hp.com
>
> --
> To unsubscribe: echo unsubscribe httperf | mail majordomo@linux.hpl.hp.com
--
To unsubscribe: echo unsubscribe httperf | mail majordomo@linux.hpl.hp.com