praxder / gtm-http-fetcher

Automatically exported from code.google.com/p/gtm-http-fetcher
Other
0 stars 0 forks source link

Double-logging when using |setShouldDeferResponseBodyLogging:| #10

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Before fetching, call [fetcher setShouldDeferResponseBodyLogging:YES]
2. Fetch something that will result in an error (important, doesn't happen on 
successful fetches).
3. Call [fetcher setShouldDeferResponseBodyLogging:NO] in the completion 
handler.

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

Expected one log. Got two.

Looks like there are code paths to writing a log that don't check 
|shouldDeferResponseBodyLogging| first. Then when 
|shouldDeferResponseBodyLogging| is set to NO, it logs again.

The second log says "redirected from..." It thinks there's a redirect because 
it sets the |redirectedFromURL_| member variable the first time it logs 
(there's no actual redirect).

Original issue reported on code.google.com by jfar...@google.com on 30 Jul 2013 at 12:35

GoogleCodeExporter commented 9 years ago

Original comment by grobb...@google.com on 13 Aug 2013 at 10:18

GoogleCodeExporter commented 9 years ago
https://code.google.com/p/gtm-http-fetcher/source/detail?r=130

Original comment by grobb...@google.com on 20 Aug 2013 at 6:41