The Artima Developer Community
Sponsored Link

Ruby Buzz Forum
Need Help on HTTP Status Code

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page


Posts: 201
Nickname: cfis
Registered: Mar, 2006

Charlie Savage
Need Help on HTTP Status Code Posted: Mar 31, 2006 12:18 AM
Reply to this message Reply

This post originated from an RSS feed registered with Ruby Buzz by .
Original Post: Need Help on HTTP Status Code
Feed Title: cfis
Feed URL: http://cfis.savagexi.com/articles.rss
Feed Description: Charlie's Blog
Latest Ruby Buzz Posts
Latest Ruby Buzz Posts by
Latest Posts From cfis

Advertisement

Imagine the following situation:

  1. You have an HTML sign up form for a user.
  2. One of the fields is for the user’s email.
  3. The user fills in the data and POSTs the response to the server.
  4. The server rejects the request, perhaps the email address is already taken.

Is there an appropriate HTTP status code for this? It seems to me this falls into the 4xx range since the client provided invalid data. Its not a 400 though since the server understood the request. And none of the other 4xx codes seem to fit.

I ran into a similar situation today, except that I’m doing it via an XmlHttpRequest. When posting some data to the server, the request always returns HTTP status code 200 whether or not data was actually inserted into the backend database. Thus, the server has to return back a response that tells the client what happened - probably via a little bit of JavaScript. But it seems like using an HTTP status code would be a much cleaner solution.

Any ideas? Or am I trying to misuse HTTP status codes?

Read: Need Help on HTTP Status Code

Topic: To Hell With Oranges Previous Topic   Next Topic Topic: I Concurso de Tutoriales de Perl en Español

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use