http-status-codes

How to turn off default HTTP status code errors in Zend Server?

Every time I return some status code in my PHP code, Zend Server gives me following error appended on the bottom of my website (with the message of HTTP code I returned). So for example, if I return 401, it gives me another 401 error appended to my 401 page: Is there any way to turn it off? I use Zend Server Community Edition 5.0 with...

Non-SEO anti-spoofing external link redirect: Status code?

I've read several documents on the merits of the different HTTP redirect status codes, but those've all been very SEO-centric. I've now got a problem where search-engines don't factor in, because the section of the site in question is not publicly viewable. However, we do want our website to be as accurate / helpful with meta-data as po...

Resolve HTTP 304 - not modified in AJAX call made via GWT

We are using an application made in GWT with the server as tomcat. The project runs fine normally, however there are situations where the server is restarted. At such point of time, the ajax call made by the code below returns blank text with the status code as 304 RequestBuilder requestBuilder = new RequestBuilder(RequestBuilder.POST, ...

Server.Transfer("error_404.aspx") in Application_Error returns a blank page

I look for HttpExceptions in the Application_Error sub of my global.asx Sub Application_Error(ByVal sender As Object, ByVal e As EventArgs) Dim ex As Exception = HttpContext.Current.Server.GetLastError() If ex IsNot Nothing Then If TypeOf (ex) Is HttpUnhandledException Then If ex.InnerExcept...

Is HTTP 404 appropriate for out of range page number on paged content?

I have a site that is mainly showing a paged list of content (articles, data element's, etc.), and I'm wondering about returning HTTP 404 when user navigates outside of the available list range (eg. by hand edited url). Some sites just display "No results/Page number out of range" and some return additionally return HTTP 404 status. Wh...

Zend Framework REST service HTTP status code problem

I'm trying to create a REST service in zend framework. I'm using zend server. Here's my code: class ArticleController extends Zend_Rest_Controller { public function postAction() { //Create the acticle and return it $data = array("foo" => 0, "boo" => 11); $this->getResponse()->setHttpResponseCode(201); $this->_helper...

What could trigger a change of http status to 500 on the client's end?

We have a PHP web application that posts data to itself, and either displays an updated page based on that data, or redirects to another page. An example of this is a script with a paged list on it, where clicking on the Next link causes a post to the same page, which then returns an updated version of the page showing the new set of lis...

Android: How get the status-code of an HttpClient request

I want to download a file from and need to check the response status code (ie HTTP /1.1 200 OK). This is a snipped of my code: HttpGet httpRequest = new HttpGet(myUri); HttpEntity httpEntity = null; HttpClient httpclient = new DefaultHttpClient(); HttpResponse response = httpclient.execute(httpRequest); ... How do i get the status-cod...

JQuery ajax request returns error and status 0

I use this pseudo-class to make ajax request to server: function RequestManager(url, params, success, error){ //save this ajax configuration this._ajaxCall = null; this._url= url; this._type = params.type; this._success = function(){ alert("ok"); }; this._error = function(){ alert("ko"); }; } RequestManager.prot...

System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse request failed with HTTP status 404

I am trying to make some enhancements to a production web app. After quite a bit of unit testing on my WinXP IIS 5.1 development machine, everything works on my localhost so I used the Visual Studio 2008 PUBLISH dialog on my Dev PC to push the following projects to a staging server: the primary web app the "primary" webservice (the hom...

What is correct HTTP status code when redirecting to a login page?

When a user is not logged in and tries to access an page that requires login, what is the correct HTTP status code for a redirect to the login page? I don't feel that any of the 3xx fit that description. 10.3.1 300 Multiple Choices The requested resource corresponds to any one of a set of representations, each with its own ...

Apache + Passenger not passing on custom status codes

I'm currently building an API. This API communicates with the client via status codes. I created several custom status codes (as per http://www.w3.org/Protocols/rfc2616/rfc2616-sec6.html#sec6) in order to inform the client on certain things. For example I introduced the 481 status code to signify a specific client error. The Rails app ...

How do I resolve a HTTP 414 "Request URI too long" error?

I have developed a PHP web app. I am giving an option to the user to update multiple issues on one go. In doing so, sometimes the user is encountering this error. Is there any way to increase the lenght of URL in apache? ...

How do I get the HTML status code with jQuery?

I want to check if a page returns the status code 401. Is this possible? Here is my try, but it only returns 0. $.ajax({ url: "http://my-ip/test/test.php", data: {}, complete: function(xhr, statusText){ alert(xhr.status); } }); ...

How often are etags used these days and what is their maximum length?

Curious to know how common it is for web servers to use etags, especially with RSS feeds? Also I can't seem to find what the maximum length can be for the etag header. The HTTP spec fails to mention it, at least the part that I was reading. ...

Make PHP page return "304 Not Modified" if it hasn't been modified

I have a PHP file that will return the same thing with the same $_GET parameters every time -- it's deterministic. Unfortunately for efficiency (this file is requested very often), Apache defaults to a "200 OK" response whenever a PHP page is requested, making the user download the file again. Is there any way to send a 304 Not Modifie...

How to test an HTTP 301 redirect?

How can one easily test HTTP return codes, like, say, a 301 redirect? For example, if I want to "see what's going on", I can use telnet to do something like this: ... $ telnet nytimes.com 80 Trying 199.239.136.200... Connected to nytimes.com. Escape character is '^]'. GET / HTTP/1.0 (enter) (enter) HTTP/1.1 200 OK Server: Sun-...

What HTTP status response code should I use if the request is missing a required parameter?

I am thinking 412 (Precondition Failed) but there may be a better standard? ...

HTTP status code for "success with errors"?

I've poked around a bit, but I don't see an HTTP status code for when a request's succeeds, but there is an error after the "point of no return". e.g., Say you process a request, its committed to the database, but while returning the result you run of memory, or encounter a NPE, or what have you. It would have been a 200 response, but ...

NSHTTPURLRequest header

Hello, I would like to get some information from a website. I have already got the HTML code of the website. However, I would like to get more header information of the website (e.g. http status code) After read the apple library, I found that there are 2 methods which can display those information. However, I can only use one of the m...