Solved

502 Bad Gateway error when trying to download a file from my local web server

Posted on 2004-08-13
6
2,885 Views
Last Modified: 2012-05-05
This is weird.  When clicking on a link to download a file on a local web server (one on our lan) and the file resides on the web server itself, I get:
 "CGI Error  The specified CGI application misbehaved by not returning a complete set of http headers. The headers are:  (nothing listed)"
When I sniffed the packets the http code was a "502 bad gateway error"
After looking this up, it mentions things about gateway/proxy.  This server does neither of those functions, and the file I am trying to download is on the same server that IIS5.0 is running on.  Permissions to this file have not changed and it worked a week ago.  

Help!!
0
Comment
Question by:ttruka
  • 3
  • 2
6 Comments
 
LVL 16

Expert Comment

by:Sohel Rana
ID: 11796800
Hi:

According to the Internet Errors and FAQs :
http://www.griffin.peachnet.edu/oit/wwwfaqs.htm#502

---------------------
502 - Bad gateway - A server (not necessarily a Web server) is acting as a gateway (or a type of routing device) to fulfill the request by the client (e.g. your Web browser) to access the requested Web page. An invalid response was received from an upstream server it accessed to fulfill the request. This usually does not mean that the upstream server is down (no response to the gateway), but rather that the upstream server and the gateway do not agree on the protocol for exchanging data. Given that Internet protocols are quite clear, it often means that one or both machines have been incorrectly or incompletely programmed.
The first thing to try when you receive this error is simply to wait a few minutes and try again.  If you are unsuccessful the second time there is nothing you can do other than to contact the person responsible for the website to let them know that you received the error.

---------------------

rsdn

0
 

Author Comment

by:ttruka
ID: 11796871
I am the one responsible for the web site.  IIS 5.0, the file I am trying to download, and the web page files themselves are all on the same box.  There is no redirect at all for this link.
Confused.
0
 
LVL 10

Expert Comment

by:avidya
ID: 11798964
Hi,

do you have an cgi handeling your downloads and do you have read/write rights for the directory the cgi ?

if so, try just plain html for the download and see if that works.

The past weeks there where several security patches and fixes, maybe you have installed them and the are influensing your websites behavior?
0
Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

 
LVL 10

Accepted Solution

by:
avidya earned 250 total points
ID: 12116224
Hi,

Would you be so kind respond to the suggestions?
0
 

Author Comment

by:ttruka
ID: 12116280
Sorry!!  Somtimes I get too focused and forget to thank whoever helped.  The suggestions you provided were correct.  I did not have the correct permissions granted to the directory.  After I set that up, everything worked great!!

Sorry again!

Thanks so much for your help.

0
 
LVL 10

Expert Comment

by:avidya
ID: 12116314
Hi ttruka,

No harm done, glad to be of help
0

Featured Post

How Do You Stack Up Against Your Peers?

With today’s modern enterprise so dependent on digital infrastructures, the impact of major incidents has increased dramatically. Grab the report now to gain insight into how your organization ranks against your peers and learn best-in-class strategies to resolve incidents.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article will inform Clients about common and important expectations from the freelancers (Experts) who are looking at your Gig.
Color can increase conversions, create feelings of warmth or even incite people to get behind a cause. If you want your website to really impact site visitors, then it is vital to consider the impact color has on them.
The viewer will learn how to dynamically set the form action using jQuery.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

790 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question