jmeter-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mike Stover" <mstov...@apache.org>
Subject RE: proxy rewriting content type
Date Wed, 21 Aug 2002 17:06:17 GMT
Ok, good point.  But, if you do send a file, it should work, no?

-Mike

On 21 Aug 2002 at 12:31, Don Stinchfield wrote:

> Mike,
> 
> I downloaded the latest code and I'm still seeing the problem.
> I searched through the code to see if there's any place where
> content-type may be rewritten.
> 
> I found sendPostData()
> 
> \\Nozzle\d$\download\jakarta-jmeter\build\jakarta-jmeter\src\protocol\http\o
> rg\apache\jmeter\protocol\http\sampler\PostWriter.java
> 
> Is the proxy using this function to send a post?  If so then this is
> where the issue is.
> 
> Let me explain.  I have a form that optionally allows a file to be included
> in
> the post.  The problem occurs when the user decides not to provide a file.
> I believe this is still valid.  Namely, content-type = multipart/form-data
> is valid even when there's no file included.
> 
> Am I off base?
> 
> Regards,
> Don
> 
> > -----Original Message-----
> > From: Mike Stover [mailto:mstover1@apache.org]
> > Sent: Tuesday, August 20, 2002 6:37 PM
> > To: JMeter Users List
> > Subject: RE: proxy rewriting content type
> >
> >
> > I don't know what to say - it worked perfectly for me.  My best
> > guess is that you aren't actually
> > running the latest code.  Maybe you forgot to do a new build
> > after updating from CVS, or
> > maybe the files didn't get overwritten when you unzipped the
> > 1.7.3 archive?
> >
> > Does JMeter say it's 1.7.3 when you go to Help-->About?
> >
> > -Mike
> >
> > On 20 Aug 2002 at 12:19, Don Stinchfield wrote:
> >
> > > Sure.  I've supplied the request from the browser to the proxy followed
> > > by the request from the proxy to ther server.
> > >
> > > BTW, the jMeter I have is 1.7.3 and is dated 8/14, 4:56 AM.
> > >
> > > Here's the request from the browser to the proxy...
> > >
> > >     POST
> > http://frodo/engenda/workspace/actions/attach_created_object.jsp
> > > HTTP/1.0\r\n
> > >     Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*\r\n
> > >     Referer:
> > >
> > http://frodo/engenda/workspace/dialogs/attach_created_object.jsp?d
> > ialog_titl
> > >
> > e_image=..%2F..%2Fworkspace%2Fimages%2Fattach_content_dialog_heade
> > r.gif&dial
> > >
> > og_animation=false&template_loaded=true&dialog_button=create&dialo
> > g_button=c
> > > ancAccept-Language: en-us\r\n
> > >     Accept-Language: en-us\r\n
> > >     Content-Type: multipart/form-data;
> > > boundary=---------------------------7d27dd40174\r\n
> > >     Accept-Encoding: gzip, deflate\r\n
> > >     User-Agent: Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)\r\n
> > >     Host: frodo\r\n
> > >     Content-Length: 632\r\n
> > >     Proxy-Connection: Keep-Alive\r\n
> > >     Pragma: no-cache\r\n
> > >     Cookie: sesessionid=ai-eeTbqkkKOZf21VggTgQcz1Q4\r\n
> > >     \r\n
> > > 0000  2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d   ----------------
> > > 0010  2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 37 64 32   -------------7d2
> > > 0020  37 64 64 34 30 31 37 34 0d 0a 43 6f 6e 74 65 6e   7dd40174..Conten
> > > 0030  74 2d 44 69 73 70 6f 73 69 74 69 6f 6e 3a 20 66   t-Disposition: f
> > > 0040  6f 72 6d 2d 64 61 74 61 3b 20 6e 61 6d 65 3d 22   orm-data; name="
> > > 0050  74 61 73 6b 2d 69 64 22 0d 0a 0d 0a 64 35 61 33   task-id"....d5a3
> > > 0060  62 38 31 34 34 63 62 65 66 66 33 62 31 64 33 37   b8144cbeff3b1d37
> > > 0070  30 64 65 64 63 30 61 38 30 30 30 63 0d 0a 2d 2d   0dedc0a8000c..--
> > > 0080  2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d   ----------------
> > > 0090  2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 37 64 32 37 64   -----------7d27d
> > > 00a0  64 34 30 31 37 34 0d 0a 43 6f 6e 74 65 6e 74 2d   d40174..Content-
> > > 00b0  44 69 73 70 6f 73 69 74 69 6f 6e 3a 20 66 6f 72   Disposition: for
> > > 00c0  6d 2d 64 61 74 61 3b 20 6e 61 6d 65 3d 22 73 63   m-data; name="sc
> > > 00d0  68 65 6d 61 2d 69 64 22 0d 0a 0d 0a 68 74 6d 6c   hema-id"....html
> > > 00e0  2d 72 69 6f 0d 0a 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d   -rio..----------
> > > 00f0  2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d   ----------------
> > > 0100  2d 2d 2d 37 64 32 37 64 64 34 30 31 37 34 0d 0a   ---7d27dd40174..
> > > 0110  43 6f 6e 74 65 6e 74 2d 44 69 73 70 6f 73 69 74   Content-Disposit
> > > 0120  69 6f 6e 3a 20 66 6f 72 6d 2d 64 61 74 61 3b 20   ion: form-data;
> > > 0130  6e 61 6d 65 3d 22 6f 62 6a 65 63 74 2d 6e 61 6d   name="object-nam
> > > 0140  65 22 0d 0a 0d 0a 62 6f 67 75 73 32 0d 0a 2d 2d   e"....bogus2..--
> > > 0150  2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d   ----------------
> > > 0160  2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 37 64 32 37 64   -----------7d27d
> > > 0170  64 34 30 31 37 34 0d 0a 43 6f 6e 74 65 6e 74 2d   d40174..Content-
> > > 0180  44 69 73 70 6f 73 69 74 69 6f 6e 3a 20 66 6f 72   Disposition: for
> > > 0190  6d 2d 64 61 74 61 3b 20 6e 61 6d 65 3d 22 73 69   m-data; name="si
> > > 01a0  6e 67 6c 65 5f 6b 65 79 77 6f 72 64 22 0d 0a 0d   ngle_keyword"...
> > > 01b0  0a 0d 0a 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d   ...-------------
> > > 01c0  2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d   ----------------
> > > 01d0  37 64 32 37 64 64 34 30 31 37 34 0d 0a 43 6f 6e   7d27dd40174..Con
> > > 01e0  74 65 6e 74 2d 44 69 73 70 6f 73 69 74 69 6f 6e   tent-Disposition
> > > 01f0  3a 20 66 6f 72 6d 2d 64 61 74 61 3b 20 6e 61 6d   : form-data; nam
> > > 0200  65 3d 22 75 70 6c 6f 61 64 65 64 2d 66 69 6c 65   e="uploaded-file
> > > 0210  22 3b 20 66 69 6c 65 6e 61 6d 65 3d 22 22 0d 0a   "; filename=""..
> > > 0220  43 6f 6e 74 65 6e 74 2d 54 79 70 65 3a 20 61 70   Content-Type: ap
> > > 0230  70 6c 69 63 61 74 69 6f 6e 2f 6f 63 74 65 74 2d   plication/octet-
> > > 0240  73 74 72 65 61 6d 0d 0a 0d 0a 0d 0a 2d 2d 2d 2d   stream......----
> > > 0250  2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d   ----------------
> > > 0260  2d 2d 2d 2d 2d 2d 2d 2d 2d 37 64 32 37 64 64 34   ---------7d27dd4
> > > 0270  30 31 37 34 2d 2d 0d 0a                           0174--..
> > >
> > >
> > >
> > >
> > >
> > > And here's the request from the proxy to the server....
> > >
> > >
> > >
> > > Hypertext Transfer Protocol
> > >     POST /engenda/workspace/actions/attach_created_object.jsp
> > HTTP/1.1\r\n
> > >     Connection: keep-alive\r\n
> > >     Content-Type: application/x-www-form-urlencoded\r\n
> > >     Accept-Language: en-us\r\n
> > >     Referer:
> > >
> > http://frodo/engenda/workspace/dialogs/attach_created_object.jsp?d
> > ialog_titl
> > >
> > e_image=..%2F..%2Fworkspace%2Fimages%2Fattach_content_dialog_heade
> > r.gif&dial
> > >
> > og_animation=false&template_loaded=true&dialog_button=create&dialo
> > g_button=c
> > > ancChecksum: 0xf7a0 (correct)
> > >     Pragma: no-cache\r\n
> > >     Host: frodo\r\n
> > >     Accept-Encoding: gzip, deflate\r\n
> > >     Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*\r\n
> > >     Cookie: sesessionid=ai-eeTbqkkKOZf21VggTgQcz1Q4\r\n
> > >     User-Agent: Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)\r\n
> > >     Content-length: 94\r\n
> > >     \r\n
> > > 0000  74 61 73 6b 2d 69 64 3d 64 35 61 33 62 38 31 34   task-id=d5a3b814
> > > 0010  34 63 62 65 66 66 33 62 31 64 33 37 30 64 65 64   4cbeff3b1d370ded
> > > 0020  63 30 61 38 30 30 30 63 26 73 63 68 65 6d 61 2d   c0a8000c&schema-
> > > 0030  69 64 3d 68 74 6d 6c 2d 72 69 6f 26 6f 62 6a 65   id=html-rio&obje
> > > 0040  63 74 2d 6e 61 6d 65 3d 62 6f 67 75 73 32 26 73   ct-name=bogus2&s
> > > 0050  69 6e 67 6c 65 5f 6b 65 79 77 6f 72 64 3d         ingle_keyword=
> > >
> > >
> > >
> > >
> > > > -----Original Message-----
> > > > From: Mike Stover [mailto:mstover1@apache.org]
> > > > Sent: Tuesday, August 20, 2002 11:51 AM
> > > > To: JMeter Users List
> > > > Subject: RE: proxy rewriting content type
> > > >
> > > >
> > > > This shouldn't be happening.  Jochen from Germany noticed the
> > > > same problem, and I fixed it
> > > > and he verified it.  Can you get the exact headers your browser
> > > > is sending, and then what
> > > > JMeter is turning them into?
> > > >
> > > > -Mike
> > > >
> > > > On 20 Aug 2002 at 11:24, Don Stinchfield wrote:
> > > >
> > > > > Hi Mike,
> > > > >
> > > > > I'm using 1.7.3.  My server is iPlanet 4.1 sp9 on w2k server.
> > > > >
> > > > > I'm using ie 6.0.
> > > > >
> > > > > I've traced the session using ethereal and I can see the proxy
> > > > > rewriting some stuff.
> > > > >
> > > > > Regards,
> > > > > Don
> > > > >
> > > > > > -----Original Message-----
> > > > > > From: Mike Stover [mailto:mstover1@apache.org]
> > > > > > Sent: Tuesday, August 20, 2002 10:51 AM
> > > > > > To: JMeter Users List
> > > > > > Subject: Re: proxy rewriting content type
> > > > > >
> > > > > >
> > > > > > What version of JMeter are you using, and what web server
> > > > > > software are you
> > > > > > using?
> > > > > >
> > > > > > -Mike
> > > > > >
> > > > > > On 20 Aug 2002 at 10:42, Don Stinchfield wrote:
> > > > > >
> > > > > > > I'm using the jmeter proxy to record a post request.
> > > > > > > My Post uses a content-type of "multipart/form-data".
> > > > > > >
> > > > > > > The proxy rewrites the content-type to
> > > > > > "application/x-www-form-urlencoded".
> > > > > > > The body of the message is also rewritten.
> > > > > > >
> > > > > > > Is there a way to configure the http proxy to use the
> > content-type
> > > > > > > as set by the client?
> > > > > > >
> > > > > > > Regards,
> > > > > > > Don
> > > > > > >
> > > > > > > --
> > > > > > > To unsubscribe, e-mail:
> > > > > > <mailto:jmeter-user-unsubscribe@jakarta.apache.org>
> > > > > > > For additional commands, e-mail:
> > > > > > <mailto:jmeter-user-help@jakarta.apache.org>
> > > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > > --
> > > > > > Michael Stover
> > > > > > mstover1@apache.org
> > > > > > Yahoo IM: mstover_ya
> > > > > > ICQ: 152975688
> > > > > >
> > > > > > --
> > > > > > To unsubscribe, e-mail:
> > > > > > <mailto:jmeter-user-unsubscribe@jakarta.apache.org>
> > > > > > For additional commands, e-mail:
> > > > > > <mailto:jmeter-user-help@jakarta.apache.org>
> > > > > >
> > > > > >
> > > > > >
> > > > >
> > > > > --
> > > > > To unsubscribe, e-mail:
> > > <mailto:jmeter-user-unsubscribe@jakarta.apache.org>
> > > > For additional commands, e-mail:
> > > <mailto:jmeter-user-help@jakarta.apache.org>
> > > >
> > >
> > >
> > >
> > > --
> > > Michael Stover
> > > mstover1@apache.org
> > > Yahoo IM: mstover_ya
> > > ICQ: 152975688
> > >
> > > --
> > > To unsubscribe, e-mail:
> > > <mailto:jmeter-user-unsubscribe@jakarta.apache.org>
> > > For additional commands, e-mail:
> > > <mailto:jmeter-user-help@jakarta.apache.org>
> > >
> > >
> > >
> > >
> > > --
> > > To unsubscribe, e-mail:
> > <mailto:jmeter-user-unsubscribe@jakarta.apache.org>
> > > For additional commands, e-mail:
> > <mailto:jmeter-user-help@jakarta.apache.org>
> > >
> >
> >
> >
> > --
> > Michael Stover
> > mstover1@apache.org
> > Yahoo IM: mstover_ya
> > ICQ: 152975688
> >
> > --
> > To unsubscribe, e-mail:
> > <mailto:jmeter-user-unsubscribe@jakarta.apache.org>
> > For additional commands, e-mail:
> > <mailto:jmeter-user-help@jakarta.apache.org>
> >
> >
> >
> 
> 
> --
> To unsubscribe, e-mail:   <mailto:jmeter-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:jmeter-user-help@jakarta.apache.org>
> 



--
Michael Stover
mstover1@apache.org
Yahoo IM: mstover_ya
ICQ: 152975688

--
To unsubscribe, e-mail:   <mailto:jmeter-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:jmeter-user-help@jakarta.apache.org>


Mime
View raw message