We have a user who was getting 404 page not found errors on all pages. When I looked in the access logs, sure enough I could see the server sending a 404 response. There were no errors in the server logs and other users were having no problem fetching the same pages. After she rebooted her machine, everything was working fine again so...
sh-3.2# perl -v
This is perl, v5.8.9 built for darwin-2level
...
sh-3.2# perl 2348.pl
Can't locate HTTP/Cookies.pm in @INC (@INC contains: /opt/local/lib/perl5/site_perl/5.8.9/darwin-2level /opt/local/lib/perl5/site_perl/5.8.9 /opt/local/lib/perl5/site_perl /opt/local/lib/perl5/vendor_perl/5.8.9/darwin-2level /opt/local/lib/perl5/ven...
In WSGI headers are represented in the environ as 'HTTP_XXX' values. For example the value Cookie: header is stored at the HTTP_COOKIE key of the environ.
How are multiple request headers with the same header name represented?
...
I know the "XMLHttpRequest" object supports a method "open" which has an optional parameter of a username and password. I just found out that these parameters can be supplier for requests requiring container-based authentication.
This is the method signature:
open(method, url, async, username, password)
Can someone help me out with t...
I am writing a crawler. Once after the crawler logs into a website I want to make the crawler to "stay-always-logged-in". How can I do that? Is a client (like browser, crawler etc.,) make a server to obey this rule? This scenario could occur when the server allows limited logins in day.
...
I just learned ruby, and already have some html/javascript/css background. When i learn rails i found that there's just too much magic. I want to use ruby to create a dynamic website from scratch - just for learning all the underlying stuff. So is there any book or article well suited for me to getting started with? thanks in advance!
so...
Hi, I'm working on making an HTTP server for my class. But, the returned file is not being displayed by firefox. I construct a response header and put in the right content-length of the file I want to send, then I send the response headers with a call to send(). Next I use send() again to send the file, why is firefox not displaying t...
I have an application in VC++ 6 (not MFC) , feature requires it to upload a file to a web server on regular basis. Web server is under our control, anonymous upload scripts/page are already setup that would accept a file manually.
How to program in VC++ 6 to upload? which classes to use?
I understand it is much possible with smtp and f...
Hi,
I would like to create a HTTP response, using multipart/mixed, but I'm not sure which browsers support it; and if it's as convenient as it sounds, from the client's point of view.
To be honest, I do not need specifically that content type. I just want to transmit more than one file in the same response; maybe there's another content-...
Hey,
When I log onto some sites, ex. http://mysite.com and then go to http://www.mysite.com, I'm not logged in? But if I switch back to http://mysite.com (without the www's) I'm logged in again?
Anyone know why this is or how to make it so that if you log in on one, you're logged in on both?
Thanks,
Matt
...
Instead of the file itself?
EDIT
Best with a demo in PHP?
...
theurl = 'http://bit.ly/6IcCtf/'
urlReq = urllib2.Request(theurl)
urlReq.add_header('User-Agent',random.choice(agents))
urlResponse = urllib2.urlopen(urlReq)
htmlSource = urlResponse.read()
if unicode == 1:
#print urlResponse.headers['content-type']
#encoding=urlResponse.headers['content-type'].split('charset=')[-1]
#htmlSour...
I'm working on an HTTP server in c++, and right now it works for requests of text files, but when trying to get a jpeg or something, only part of the file gets sent. The problem seems to be that when I use fgets(buffer, 2000, returned_file) it seems to increment the file position indicator much more than it actually ends up putting into ...
I have to pass a meta-information in my HTTP response so I figured out that I could use the response header, for instance "X-MyData: 123456". Is that safe? I mean, there is a possibility that a client proxy remove this header?
Thanks!
...
Is jQuery able to read JSON data from X-JSON HTTP headers returned by the server? I've been searching through the jQuery docs, but all the examples I can find use JSON returned in the request body rather than the headers.
...
I need to debug a networking application which handles video downloaded by iPhone from Youtube. iPhone downloads chunks of video by requesting each time a different file range (by adding Content-Range in HTTP GET header) while PC applications usually request a whole file.
Are there any PC application (preferably Linux, but Windows is al...
I have a Flash object hosted on foo.com. When I run it, I want it to send a HTTP request to foo.com, and retrieve the results along with HTTP headers.
How would one achieve this with Flash? (AS 3)
...
First of all, I've never really used APIs before, and I've never used the HTTP library in Haskell. I'm not sure what I'm doing wrong here, so maybe somebody who knows can help.
I'm using what I can read of this: http://github.com/defunkt/gist/blob/master/gist.rb, namely the write method, to write this:
req = postRequest "http://gist.gi...
I'm making an HTTP server in c++, I notice that the way apache works is if you request a directory without adding a forward slash at the end, firefox still somehow knows that it's a directory you are requesting (which seems impossible for firefox to do, which is why I'm assuming apache is doing a redirect).
Is that assumption right? ...
I hate CURL it is too bulky with too many dependencies when all I need to do is quickly open a URL. I don't even need to retrieve the contents of the web page, I just need to make the GET HTTP request to the server.
What's the most minimal way I can do this and don't say CURL !@#$
...