tags:

views:

6

answers:

1

I'm using ab to test my app, and I'm having trouble passing the correct cookie. My cookie data looks like this:

messages=95925d68c34fcc68b3fcc2e5061a45278c35af41$[[\\\\"__json_message\\\\"\\\\05420\\\\054\\\\"Data\\\\"]]

I can't figure out how to get the second part of the string to ab to send to my server. I'm doing something like

ab -C messages='95*snip*5af41$[[\\\\"__json_message\\\\"\\\\05420\\\\054\\\\"Data\\\\"]]' http://example.com:80/

Everything up to the [ is sent, but nothing from there on. I'm concerned [ is some kind of control to my shell that is getting escaped, but I'm not quite sure what the deal is. I thought the single quotes should allow me to put anything but another single quote inside of them.

A: 

I figured it out. Turns out the correct syntax is:

ab -C 'messages="93bad4084536e6ee5839de07d59c8a42eadf014f$[[\"__json_message\"\05420\054\"Houston3\"]]"' http://localhost:8000/
Paul McMillan