bmgriner
14 years agoFrequent Contributor
Raw Request Not True
I had an issue where a cookie was being sent despite my setting it to a bad value. When I looked at the raw view it shows what I expect, but when I looked in the http log I saw a different request being sent out.
Raw Request
This is what I see in the http log:
Am I missing something here? Why are we sending multiple cookies when I only specified one?
I noticed that if I changed the Cookie value from badcookie to MCDS=badcookie, that the request was correct.
You guys aren't acting like a browser and retaining and resending Cookies are you?
Raw Request
POST [MY_SERVER]/[MY_LOCAL_URI] HTTP/1.1
Accept-Encoding: gzip,deflate
Content-Type: application/x-www-form-urlencoded
Accept: application/json
Cookie: badcookie
paramater=badvalue
This is what I see in the http log:
Wed May 16 11:28:22 MST 2012:DEBUG:>> "POST [MY_LOCAL_URI] HTTP/1.1[\r][\n]"
Wed May 16 11:28:22 MST 2012:DEBUG:>> "Accept-Encoding: gzip,deflate[\r][\n]"
Wed May 16 11:28:22 MST 2012:DEBUG:>> "Content-Type: application/x-www-form-urlencoded[\r][\n]"
Wed May 16 11:28:22 MST 2012:DEBUG:>> "Accept: application/json[\r][\n]"
Wed May 16 11:28:22 MST 2012:DEBUG:>> "Cookie: badcookie[\r][\n]"
Wed May 16 11:28:22 MST 2012:DEBUG:>> "Content-Length: 22[\r][\n]"
Wed May 16 11:28:22 MST 2012:DEBUG:>> "Host: [MY_HOST]:[MY_PORT][\r][\n]"
Wed May 16 11:28:22 MST 2012:DEBUG:>> "Connection: Keep-Alive[\r][\n]"
Wed May 16 11:28:22 MST 2012:DEBUG:>> "User-Agent: Apache-HttpClient/4.1.1 (java 1.5)[\r][\n]"
Wed May 16 11:28:22 MST 2012:DEBUG:>> "Cookie: MCDS=****[\r][\n]"
Wed May 16 11:28:22 MST 2012:DEBUG:>> "Cookie2: $Version=1[\r][\n]"
Wed May 16 11:28:22 MST 2012:DEBUG:>> "[\r][\n]"
Wed May 16 11:28:22 MST 2012:DEBUG:>> "parameter=badvalue"
Wed May 16 11:28:22 MST 2012:DEBUG:<< "HTTP/1.1 403 Forbidden[\r][\n]"
Wed May 16 11:28:22 MST 2012:DEBUG:<< "Server: Apache-Coyote/1.1[\r][\n]"
Wed May 16 11:28:22 MST 2012:DEBUG:<< "Content-Type: application/json;charset=UTF-8[\r][\n]"
Wed May 16 11:28:22 MST 2012:DEBUG:<< "Content-Length: 242[\r][\n]"
Wed May 16 11:28:22 MST 2012:DEBUG:<< "Date: Wed, 16 May 2012 18:28:22 GMT[\r][\n]"
Wed May 16 11:28:22 MST 2012:DEBUG:<< "[\r][\n]"
Wed May 16 11:28:22 MST 2012:DEBUG:<< "[MY_RESPONSE]"
Am I missing something here? Why are we sending multiple cookies when I only specified one?
I noticed that if I changed the Cookie value from badcookie to MCDS=badcookie, that the request was correct.
You guys aren't acting like a browser and retaining and resending Cookies are you?