WebFaction
Community site: login faq

Dear all,

I'm baffled: between yesterday and today something happened to my webpage/cgi interaction that I can't explain. I have a simple python cgi program that responds to jQuery ajax queries. It's now responding with 500 errors, but only if the query is referred by the page. If I query the url directly, the cgi responds as expected.

So I've got a test button on the page like this:

$("#bugtest").click(function(){
    $.get('chartexCGI.py', {'bugtest': true}, function(data) {
      alert(data);
    });

And the CGI like this:

if 'bugtest' in form:
    print "Content-Type: text/plain\n\n"
    print "These are the times that try men's souls.\n"

If I click the button, I get a "500" response like this in the log

"GET /chartex/chartexCGI.py?bugtest=true HTTP/1.1" 500 723 "http://neolography.com/chartex/"

But if I just put this url in the browser's address bar

http://my.domain/chartex/chartexCGI.py?bugtest=true

I get back my text as expected from the python script, and the access log reads:

"GET /chartex/chartexCGI.py?bugtest=true HTTP/1.1" 200 316 "-"

I get the same problem no matter what the browser.

My error_mydomain_php.log reports only:

Premature end of script headers: chartexCGI.py, referer: http://neolography.com/chartex/

Which is very unhelpful. I've no such problem running the same scripts against my apache localhost on my laptop. What could I have done to break this application so completely overnight?

Any insight would help.

thanks, Jon

asked 22 May '13, 18:14

jjon
3124
accept rate: 0%

edited 22 May '13, 18:25

This may be related to a web server configuration change that we recently deployed. Would you mind opening a support ticket and providing login credentials for your test page so that we can have a closer look?

(22 May '13, 18:25) seanf

@seanf I sure hope you're right. I've opened a ticket as you suggest. Let me know if I can provide any further diagnostic info.

Jon

(22 May '13, 18:39) jjon
Be the first one to answer this question!
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×337
×31
×13
×9

question asked: 22 May '13, 18:14

question was seen: 11,200 times

last updated: 22 May '13, 18:39

WEBFACTION
REACH US
SUPPORT
AFFILIATE PROGRAM
LEGAL
© COPYRIGHT 2003-2019 SWARMA LIMITED - WEBFACTION IS A SERVICE OF SWARMA LIMITED
REGISTERED IN ENGLAND AND WALES 5729350 - VAT REGISTRATION NUMBER 877397162
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM