1

I am looking for a tool that would run in a browser (any browser will do) and show me where each HTTP request originated (HTML source file and line, Javascript, or whatever else).

A bit of background. There is a third-party Web application that can be accessed either directly or through a content-modifying proxy. In the former case it works, in the latter it doesn't. My task is to figure out why the proxy breaks the app, and fix whatever problem there is (normally the proxy should only modifications that do not affect functionality).

I have narrowed it down to a single HTTP request. When accessed directly, the browser issues a GET to one particular address, say http://example.com/foobar.html. When accessed through the proxy, there's no such request. This foobar.html contains an important part of the application, so it won't function without it. Supposedly the proxy breaks some code that ought to issue this request. The problem is that I cannot find this code, and so cannot figure out what exactly is broken. There's nothing that looks remotely like foobar in the entire application.

The application in question is a jumble of obfuscated Javascript that generates other avascript and/or HTML that may contain more Javascript etc. Somewhere along the road it probably generates, piece by piece, some iframe src=... or whatever via document.write, and this chunk of HTML references the needed http://example.com/foobar.html.

So what I need is the ability to tell the browser: "See this address, http://example.com/foobar.html? Whenever there is a request to this address, stop and show me what are you doing!" Hopefully this will let me narrow down my search somewhat more.

I couldn't find such functionality in firebug or venkman. Am I missing something? Is there any other tool that would let me do it?

I see the Referer header of the request in question, but the referring file is very large and obfuscated. So far, I was not able to make anything meaningful out of it.

2

2 Answers 2

1

FireBug then the Network Tab...

Sign up to request clarification or add additional context in comments.

3 Comments

I can see the offending request in the network tab, but how can I go from there back to DOM or JS that caused it?
@n.m. I'm not sure if there is any Extension/Something to show that! I understand your request.
In the end I have found the error thanks to Firebug, not with the Network tab, but looking at the error console and comparing the javascript errors and warnings. But it was Firebug nevertheless, so I'm accepting your answer.
1

Fiddler - it allows to view and search the HTTP sessions. Be sure to decode sessions when searching.

4 Comments

I am looking at a recorded Fiddler session. I can plainly see the request and its Referer header. But which part of the referer?
you said you needed to find the code that generates the call to foobar.html - just search for foobar.html in the session list in fiddler and follow the code. What you're asking doesn't exist - there's no tool that can connect html elements and http requests, it's the wild wild west, such a tool would have to be so error tolerant that it would be mostly impractical.
There's nothing in the session, the request is generated in JS. The code is obfuscated and nearly impossible to follow. I don't really understand the impracticality claim.
I have found Fiddler valuable anyway. It allowed me to save the session and recreate a working model of the application, without random obfuscation thrown in. Took some time but in the end I have found the error.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.