• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

Jetty, Apache and HTTP status code 302

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have a webapp running on Jetty 7.2.2. The webapp includes a proxy servlet which forwards requests to a Bugzilla installation running on localhost, port 80 (Apache serves the Bugzilla pages).

When I request a particular URL through the webapp, the Apache access log shows a response as expected; and the jetty request log does the same, but the web page isn't displayed in the browser, and no error message is generated.

Jetty request log

0:0:0:0:0:0:0:1 - - [22/Mar/2011:12:22:17 +0000] "GET /dash/bugs/buglist.cgi?query_format=specific&order=relevance+desc&bug_status=open&product=&content= HTTP/1.1" 200 0

Apache log

127.0.0.1 - - [22/Mar/2011:12:22:17 +0000] "GET /bugzilla/buglist.cgi?query_format=specific&order=relevance+desc&bug_status=open&product=&content= HTTP/1.1" 302 290 "http://localhost:8080/dash/bugs/query.cgi" "Mozilla/5.0 (X11; U; Linux i686; en-US) AppleWebKit/534.13 (KHTML, like Gecko) Chrome/9.0.597.98 Safari/534.13"

127.0.0.1 - - [22/Mar/2011:12:22:19 +0000] "GET /bugzilla/buglist.cgi?query_format=specific&order=relevance%20desc&bug_status=open&list_id=73 HTTP/1.1" 200 4081 "http://localhost:8080/dash/bugs/query.cgi" "Mozilla/5.0 (X11; U; Linux i686; en-US) AppleWebKit/534.13 (KHTML, like Gecko) Chrome/9.0.597.98 Safari/534.13"


Looking closer at the Apache log, I see that the initial request produces HTTP status 302, i.e. that the resource requested has moved. A second request is then made which returns '200 4081', i.e. the request has succeeded and 4081 bytes of data have been returned. However, the Jetty log indicates a '200 0' response, i.e. a successful fetch but zero bytes returned. If I access Bugzilla through Apache (i.e. not through my webapp on localhost:8080), all works just fine.

How can I configure my webapp to ensure that moved resources are displayed? Is it a Jetty configuration issue, or do I have to adjust my Apache configuration?

Thank you,

Clive
 
Clive vanHiltenn
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Update: things go wrong when I log in to Bugzilla through my webapp. If I'm not logged in I can search for bugs (but obviously not update them). If I log in, the search page just 'goes nowhere', i.e. zero bytes are fetched.

Looking closer at the link targets displayed on the various pages within Bugzilla, I can see that when logged in, the link is of type 'http://localhost/bugzilla' when it should be of type 'http://localhost:8080/dash/bugzilla'. When not logged in, the links are correct. The reason zero bytes are returned must be to do with this difference. Very strange .....
 
Where does a nanny get ground to air missles? Protect this tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic