[httperf] Request Headers

Delano Mandelbaum delano at solutious.com
Thu Nov 27 06:49:07 PST 2008


Hmm, that's curious. Here's the output when I run the command:

$ httperf --server=tp1 --uri=/small.html --num-conns=1 --rate=0
--timeout=30 --think-timeout=0 −−add−header="X-Header: test\n"
--print-request
httperf --print-request --timeout=30 --client=0/1 --server=tp1
--port=80 --uri=/small.html --send-buffer=4096 --recv-buffer=16384
--num-conns=1 --num-calls=1
SH0:GET /small.html HTTP/1.1
SH0:User-Agent: httperf/0.9.0
SH0:Host: tp1
SH0:
SS0: header 70 content 0
Maximum connect burst length: 0

Total: connections 1 requests 1 replies 1 test-duration 0.001 s


Actually, I just noticed that httperf does not echo back the
add-header parameter in the first line of my output. What does that
mean?

Delano


On Thu, Nov 27, 2008 at 3:33 PM, Arlitt, Martin <martin.arlitt at hp.com> wrote:
> Hi Delano
>
> I'm not sure why it's not working for you; it seems to work for me:
>
> $ ./httperf --server=mysvr --print-request --add-header="X-Header: test\n"
> httperf --print-request --client=0/1 --server=mysvr --port=80 --uri=/ --send-buffer=4096 --recv-buffer=16384 --add-header='X-Header: test\n' --num-conns=1 --num-calls=1
> SH0:GET / HTTP/1.1
> SH0:User-Agent: httperf/0.9.0
> SH0:Host: mysvr
> SH0:X-Header: test
> SH0:
> SS0: header 75 content 0
> Maximum connect burst length: 0
>
> Total: connections 1 requests 1 replies 1 test-duration 0.011 s
>
> I also tried it with the same options as you used, and that seemed to work for me as well.
>
> Martin
>
>> -----Original Message-----
>> From: httperf-bounces at napali.hpl.hp.com [mailto:httperf-
>> bounces at napali.hpl.hp.com] On Behalf Of Delano Mandelbaum
>> Sent: Thursday, November 27, 2008 6:23 AM
>> To: httperf at napali.hpl.hp.com
>> Subject: [httperf] Request Headers
>>
>> Hi,
>>
>> I'm using httperf 0.9.0 and I'd like to add HTTP headers to the
>> requests. I've tried the following without success:
>> httperf --hog --server=tp1 --uri=/small.html --num-conns=1 --rate=0
>> --timeout=30 --think-timeout=0 −−add−header="X-Header: value\n"
>> --print-request
>>
>> Is there something else I need to do to get this to work?
>>
>> Delano
>>
>> _______________________________________________
>> httperf mailing list
>> httperf at linux.hpl.hp.com
>> http://www.hpl.hp.com/hosted/linux/mail-archives/httperf/
>



More information about the httperf mailing list