-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sending Headers? #17
Comments
I would try this instead:
|
I moved the response.headers outside of the function and added header for 'Content-Length'. I got a little bit further. Any suggestions on how to get passed this error? Now it is returning the error:
|
Not sure what could be the issue, but you could try writing some vars to a debug log. Try this...
Then log(var). |
I tried loading that image, and it returned this.
That gives you a line number. Also try moving everything but the headers to a separate file using |
How did you get all of the extra return text? That would be helpful with trying to get this to work. |
I used cURL, but can't reproduce the error. I suspect your headers are wrong. Try changing your content-type to text/html. Use the log function I pasted to debug the code. Good luck! |
The only thing I can think of, is that CgiHttpRequest and CgiHttpResponse are not ready yet so something is not working on sending the data and ending the request. I'll have to use PHP until they are ready. :-( Is there a time frame for the next release? |
No, the author isn't maintaining this repo. I have no part in cgi-node development. That you can see an error from cgi-node in curl would suggest its your code, not the cgi wrapper. Undefined means one of your variables are not returning the value they are supposed to. My guess is you used two fs calls on the same file and the encoding for the image is binary, something cgi-node can't handle by itself. You could try a helper such as node-image. |
Hello.
I've tried various ways to send a header and I get errors. What is the preferred way to send a header?
This is the error I get:
EXCEPTION: header is not defined
Here is what I'm trying to do.
The text was updated successfully, but these errors were encountered: