http-status-codes

Is there a simple app for pinging a list of websites?

Basically, I just need a simple app that frequently pings external IP Addresses and web addresses to make sure the sites are up. Does anyone know of a good one of these? I started to make one myself, but wanted to know if someone else has already done the work. It just needs to track multiple external addresses with the status codes r...

HTTP Status Code for database is down

I have a page on my web site that reports on the health of the site and sets an HTTP 200 status code is everything is okay. This page is used by an external monitoring program to check that the site is up. When this page is hit, I make a very lightweight DB proc call to see if the DB is up and okay. If this fails, I want to return a mea...

Parsing HTTP status code

Hello, I am using PHP to parse the numeric portion of the HTTP status code response. Given a standard "HTTP/1.1 200 OK" response, I'd use: $data = explode(' ', "HTTP/1.1 200 OK"); $code = $data[1]; I'm not an expert on HTTP. Would I ever encounter a response where the code is not at the position of $data[1] as in the above example?...

Asp Classic return specific http status code

How can I return a specific http status code from an asp classic? ...

400 Bad Request when getting a page with PHP Curl

I keep getting a 400 bad request code from a hotfile.com page when I try to get it with curl. I can get the pages fine in the browser The first (login) (post) request in the script works The last (get) request in the for loop works I have tried setting the curl headers to the same headers sent by my browser I have tried sleeping up to ...

How to programatically set Response.StatusCode different than 200 OK in ASP.NET Application and still serve content to client successfully?

Setting Response.StatusCode = 404 doesn't serve content under neither IE8 nor Chrome? It works in Mozilla though I find it strange! Do the simplest of things - empty asp.net web application project with empty Default.aspx page. In Page_Load event use the following: protected void Page_Load( object sender, EventArgs e ) { Response.S...

HTTP Response Question

Is it valid to return different text in the response header than the usual fare? For example if the request is invalid, could I respond with: HTTP/1.1 400 Here be Dragons And have that header properly handled by proxies, etc? ...

RESTful API response status code disambiguation

I'm developing a RESTful API and have a question about the most appropriate response status codes for certain scenarios. Consider the case where the client makes a GET request for a resource. How can I disambiguate a "not found" response for the case where the resource legitimately does not exist, vs. the case where there may be a minor...

Accessing XMLHttpRequest from the success ajax event in jQuery

According to the doc, the 'error' ajax event gets passed the XMLHttpRequest object, 'success' does not. http://docs.jquery.com/Ajax/jQuery.ajax That's a shame, because I would like to be able to access the HTTP status code in success. I am doing so successfully with error. error: function(data){ alert(data.status) } Any leads would...

Google Chrome; refresh doesn't send If-Modified-Since header

Hi there, As I am currently developing a website that simply must be able to perform more or less flawlessly under a lot of stress and switching from an automated test scenario, I would try the simple press-and-hold-F5-for-several-seconds-in-my-favorite-browser, and here I found an odd observation with Google Chrome: If you do the abov...

Java library to map HTTP status code to description?

I'm in the situation where I'm writing custom error pages for a webapp (primarily to reduce information disclosure from the servlet container's default error pages). Since I need an error page for each error status code, I'm going to have to have a sensible response for each code. As far as I can tell, these error pages don't have to b...

What http status code is supposed to be used to tell the client the session has timed out?

In a webpage, it uses YUI connection manager/datasource to send AJAX requests to the server, if the session (which contains the info on whether the user has been authenticated) has already timed out, those ajax responses that can only be viewed by authenticated users should return an http status code, telling the client that the session ...

HTTP status code 200 (cache) vs status code 304?

I'm using the Google "Page Speed" plug-in for Firefox to access my web site. Some of the components on my page is indicated as HTTP status: 200 200 (cache) 304 By Google's "Page Speed". What I'm confused about is the difference between 200 (cache) and 304. I've refreshed the page multiple times (but have not cleared my cache) and it...

403 error in Google App Engine with staticdir

Hi, For some reason I can't get static_dir to work. In my app.ymal I have: - url: /ui static_dir: ui - url: /dump static_dir: dump Loading static files from /ui works (i.e /ui/images/logo.png). But when I try to access something from /dumo I just get: INFO 2009-11-12 14:03:55,497 dev_appserver.py:3034] "GET /dump/ka...

In Python, how do I use urllib to see if a website is 404 or 200?

How to get the code of the headers through urllib? ...

Apache 400 Absolute Path for Blogs

Here is an example of a blog with this issue. It uses Apache to send a 400 error, but keep the url as is. Is there a way in Apache using a .htaccess file to keep the url as is so the PHP script can do as needed with it, but not send a 400 error? The site works fine in some browsers, but those like IE and mobile browsers have there own...

Flex FaultEvent and HTTP status codes.

How the FaultEvent listener in HTTP Request is getting called? Is it based on the status code of response? If yes for what all status code It will get called? ...

Why does $.ajax call for json data trigger the error callback when http status code is "200 OK"?

I have the following ajax request: jQuery.ajax({ async: true, type: "GET", url: url, data: data, dataType: "json", success: function(results){ currentData = results; }, error: function(xhr, ajaxOptions, thrownError){ if (xhr.status == 200) { console.debug("Error code 200"); } else { cu...

Should I use 404 Not found or 410 Gone for a bulletin board system, when a topic is deleted?

Hi, I'm creating a bulletin board system, and now I'm implementing a 'delete topic' feature for admins. If someone opens the deleted topic, the server cannot find it, so it must be 404. On the other hand, the topic has existed sometime, so I must use 410. Implementing the 410 would require a new table called deleted_topics, and so would...

Compare URIs for a search bot?

For a search bot, I am working on a design to: * compare URIs and * determine which URIs are really the same page Dealing with redirects and aliases: Case 1: Redirects Case 2: Aliases e.g. www Case 3: URL parameters e.g. sukshma.net/node#parameter I have two approaches I could follow, one approach is to explicitly check for redirects ...