intruxxer / zaproxy

Automatically exported from code.google.com/p/zaproxy
0 stars 0 forks source link

Proxy - "502 Bad Gateway" errors responded as "504 Gateway Timeout" #585

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Run ZAP 2.0.0 under Windows 7.
2. Change the proxy on IE (for example) to affect Google Chrome too before it 
starts (or change the proxy in Chrome and run it again from scratch).
3. Run Google Chrome (once it is using ZAP).

What is the expected output? What do you see instead?

Google Chrome tries three different HEAD requests (http://) to random URLs by 
default to monitor ISP DNS "games". These requests take (on my case and based 
on the ZAP History tab output) around 2550 ms to get a response for. As a 
result, ZAP generates "504 Gateway Timeout" response messages:
--
HTTP/1.1 504 Gateway Timeout
Content-Length: 21
Content-Type: text/plain;

ZAP Error: ompqtzpofl
--

Please use labels and text to provide additional information.

Original issue reported on code.google.com by raul.si...@gmail.com on 4 Apr 2013 at 7:01

GoogleCodeExporter commented 9 years ago
What timeout in seconds do you have set?
Thats in Options/Connection

Original comment by psii...@gmail.com on 5 Apr 2013 at 8:42

GoogleCodeExporter commented 9 years ago
Sorry I forgot to mention. I have the default one: 20 seconds.

Original comment by raul.si...@gmail.com on 5 Apr 2013 at 8:55

GoogleCodeExporter commented 9 years ago
Hello, I just encounted this problem using the Tools/Options/Local Proxy 
option.  

(In my configuration i was using jmeter to make requests not chrome)

Steps to reproduce
- make a request to a server with a DELETE request
- accidentally have a body in the request (delete's should have body's)

The response from zap:

Headers:

HTTP/1.1 504 Gateway Timeout
Content-Length: 25
Content-Type: text/plain;

Body:
ZAP Error: Read timed out

I found that I would get this error because I had a body when trying to do a 
DELETE request.  

After removing the body and only "sending nothing" to the server on the delete 
request I found that zap behaved correctly.

Zap version: 2.2.2

Hope this helps

-Adam

Original comment by ashel...@retool.co on 4 Jan 2014 at 12:32

GoogleCodeExporter commented 9 years ago
The issue reported doesn't seem to be the same issue that you're seeing. The 
issue reported (which are several issues actually) is about incorrect 
response's status code/reason to other (ZAP) proxy errors than timeouts (should 
return "502 Bad Gateway" instead of "504 Gateway Timeout") and returning a 
response body to HEAD requests (raised other issue to fix that, Issue 969).

Regarding the issue that you're seeing. Which JMeter version did you used? I've 
tested with version 2.10 and it worked OK.
Would you mind check ZAP's log file to see if there's any error? (file zap.log 
located in ZAP's default directory or the directory manually specified [1]).

While testing I noticed that the body of DELETE requests is not forward by ZAP 
(I've raised an issue to fix that, Issue 970).

[1] https://code.google.com/p/zaproxy/wiki/FAQconfig

Original comment by THC...@gmail.com on 8 Jan 2014 at 2:42

GoogleCodeExporter commented 9 years ago
r4511

Original comment by THC...@gmail.com on 28 Mar 2014 at 3:05

GoogleCodeExporter commented 9 years ago

Original comment by psii...@gmail.com on 31 Mar 2014 at 11:17

GoogleCodeExporter commented 9 years ago
Fixed in ZAP 2.3.0

Original comment by psii...@gmail.com on 10 Apr 2014 at 3:25