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...
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...
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, ...
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...
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...
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...
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...
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...
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...
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...
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 ...
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 ...
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?
...
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);
}
});
...
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.
...
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 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-...
I am thinking 412 (Precondition Failed) but there may be a better standard?
...
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 ...
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...