Loading ...
Sorry, an error occurred while loading the content.
 

Debugging Tips (Was Re: Cookies, CGI::App, and mod_perl)

Expand Messages
  • Larry Leszczynski
    ... PlugProxy is also very good for this type of debugging: http://www.bbzzdd.com/plugproxy/ For just examining the HTTP request/response I find it easier and
    Message 1 of 5 , Aug 3, 2003
      > > Do some debugging. Look at the traffic going back and forth. Test it
      > > with GET or lynx. See if the cookie header is being sent.
      >
      > To elaborate a little on this thread:
      >
      > I find ethereal <http://www.ethereal.com/> useful for debugging
      > situations like this. Certain browsers (that I won't name) behave in
      > quirky ways that GET or lynx won't emulate, so it's often worth
      > running ethereal in the background whilst using your site with various
      > browsers, then analysing TCP streams in ethereal to see exactly what's
      > happening.

      PlugProxy is also very good for this type of debugging:

      http://www.bbzzdd.com/plugproxy/

      For just examining the HTTP request/response I find it easier and more
      straighforward to use than Ethereal. (The screen shot on their home page
      shows an HTTP exchange with hex mode turned on, it's actually much easier
      to read with hex mode turned off.)

      A tip for cookie testing when using PlugProxy (or similar proxying tools,
      I suppose): Generally you need to make sure you're making requests
      against the correct domain name for your browser to handle the cookies
      correctly. For example, if you set up PlugProxy on your desktop like so:

      Host: www.example.org
      Remote Port: 80
      Local Port: 8888

      then you should be able to use you browser to hit the home page with this:

      http://localhost:8888/

      *but* the browser won't send the cookies that would normally be sent to
      "example.org". The fix is to make it look like localhost is part of
      "example.org", and then make the request like this instead:

      http://localhost.example.org:8888/

      You can put something like this:

      127.0.0.1 localhost.example.org localhost

      in /etc/hosts (or <WindowsDir>\System32\drivers\etc\hosts).


      Larry Leszczynski
      larryl@...
    Your message has been successfully submitted and would be delivered to recipients shortly.