Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

Coding Forum


You are currently viewing our Coding Forum as a guest. Please register to participate.
Login



Reply
HTTP status code for invalid GET-vars?
Old 09-01-2008, 07:40 AM HTTP status code for invalid GET-vars?
schmoove's Avatar
Junior Talker

Posts: 2
Trades: 0
Hello all,

I am wondering what would be the appropriate HTTP status code for a web-page depending on a GET-var and where the GET-var is invalid

Example URI: www.test.com/test.php?id=5

In this example, the value of "id" is looked in a a database and no result is found for whatever reason (id was previously deleted or URI was modified manually).

I came across the 405 Status code "Method Not Allowed", but that doesn't seem right since the method GET is allowed, merely the value passed is incorrect. In my opinion, some sort of 4xx client error should be returned, but I am unsure which one. 404 sounds wrong, since the page test.php is being found.

Anybody have ay thoughts?
schmoove is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 09-01-2008, 08:30 AM Re: HTTP status code for invalid GET-vars?
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,519
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
The HTTP response refers to the requested URI (including the querystring) NOT the page name. So I always return a 404 response when an item is not in the database or the value is invalid.
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 09-02-2008, 09:59 AM Re: HTTP status code for invalid GET-vars?
schmoove's Avatar
Junior Talker

Posts: 2
Trades: 0
Thanks chrishirst for clarifying the amplitude of the 404 status code. You were a great help

schmoove is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to HTTP status code for invalid GET-vars?
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.11777 seconds with 12 queries