Questions tagged as 'http-status'

3
answers

What HTTP status should I use for when a parameter is missing from POST?

I have a form that will be submitted to the server via ajax, using a plugin for this. When the form is not filled correctly (in case when missing a mandatory parameter), I want to return a JSON with an error message and an error status, so that...
asked by 28.02.2014 / 22:16
3
answers

What is the difference between 401 Unauthorized and 403 Forbidden?

When designing an application, it is common for me to be in doubt as to which HTTP code to return when a user does not have access to a given resource: whether it is 401 Unauthorized or whether it is 403 Forbidden . I wanted a cle...
asked by 10.02.2015 / 18:36
1
answer

Why does a return with status code 200 return before a 204?

I have noticed that every answer to Success (200) is also a response No Content (204) . I was curious and went to search the MDN on status 200 , the The only thing that says successful results for a PUT and a DELETE should r...
asked by 08.10.2018 / 23:12
2
answers

What is http / ftp status 220?

Contextualizing ... when trying to connect to the hosting server, by FTP, always returns status 220 and, after a few seconds, disconnects by time Because it is a status of type 2xx it is not an error neither my (4xx) nor the server (5xx), but...
asked by 23.07.2018 / 00:45
1
answer

How to get the correct HTTP status?

I tried to get the error "status" like this: error_page 403 /error.php; error_page 404 /error.php; But $_SERVER['REDIRECT_STATUS'] return 200 , already in Apache it returns 404 (the expected result). How can I define...
asked by 04.05.2015 / 04:06
2
answers

Targeting all traffic from root to sub folder results in error "403 forbidden" if it does not have "index.php"

The code below works perfectly to direct all site traffic transparently into the www folder: Options -Indexes +SymLinksIfOwnerMatch RewriteEngine on RewriteBase / # Verificar o destino RewriteCond %{HTTP_HOST} ^(www.)?example.com$ # I...
asked by 18.03.2015 / 12:41
1
answer

What status can I return in an attempt to submit a form without a TOKEN?

I'd like to know what status http I should return in my application if someone is trying to forge a request via form. The application I developed is done in Laravel 4 and I'm using that CSRF_TOKEN . The CSRF_TOKEN...
asked by 13.02.2015 / 14:02
3
answers

What HTTP status code do I use to indicate validation failure?

When a method in a web API detects that there was a failure in validating the data of an entity to be added or updated is there any HTTP code that is standard to be sent? For now I am using the 400 (bad request) code, but I do not know if there...
asked by 15.07.2014 / 22:50
2
answers

What status code to use when there is no bank record to return in an HTTP request?

I have an endpoint that returns a list of products. So, if there's any data in this list, I'll set the HTTP status code to 200, and if it does not, I just return a json saying that no record was found and the status code of HTTP 200. My en...
asked by 12.06.2017 / 00:40
1
answer

Ajax POST with jQuery and Node.js Express always returning 404: Not Found

I created the route below to accept POST requests, but calls via AJAX for this route are always returning error 404: Not Found. /* Arquivo: integracoes.js */ var express = require('express'); var router = express.Router(); // Esta rota funcio...
asked by 08.10.2015 / 02:16