LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 10-07-2017, 02:04 AM   #1
Michael Uplawski
Member
 
Registered: Dec 2015
Location: Normandy, France
Distribution: Debian stretch/sid
Posts: 528
Blog Entries: 18

Rep: Reputation: 351Reputation: 351Reputation: 351Reputation: 351
[HTTP] Order of request parameters


Good morning

Can you explain to me a situation where the order of request-parameters in a HTTP request could be of importance?

More specifically, I wonder, if I can safely assume that the order of these parameters is insignificant.

The question arises, when a user-provided value has to be included, but the parameter which carries the value is not the last one in the final URL.
Example:
The pons-dictionary (www.pons.com) composes searches like this:
https://fr.pons.com/traduction?q=Tro...enfr&in=&lf=en
The search-criteria is assigned to the parameter “q”, which is a deliberate but natural choice.

I use to change the order of parameters to simplify the construction of an url, by just appending values at the end. So my “URL-template” would be
https://fr.pons.com/traduction?l=enfr&in=&lf=en&q=

That is, after the initial "?" I first put everything that does not need to be modified and end with "q" as last parameter.

For long years I have programmed web-applications, but since had some success in obliterating that souvenir. I do not remember any situation where the parameters had to be in the always same order, nor if question-mark and ampersand had any special meaning, apart from the fact that HTTP has never been meant to be abused in this way and the desire to violate this old rotten protocol has called for all kinds of strange detours and handicraft work...

TIA.

Michael

Last edited by Michael Uplawski; 10-07-2017 at 11:37 AM. Reason: Less “just”. More other words, less full-stops at the wrong spots. New, arbitrary errors added.
 
Old 10-07-2017, 06:45 AM   #2
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: Slackware
Posts: 7,567

Rep: Reputation: 2923Reputation: 2923Reputation: 2923Reputation: 2923Reputation: 2923Reputation: 2923Reputation: 2923Reputation: 2923Reputation: 2923Reputation: 2923Reputation: 2923
Quote:
Originally Posted by Michael Uplawski View Post
Can you explain to me a situation where the order of request-parameters in a HTTP request could be of importance?
No.

Python web frameworks such as Django parse them into data structures that have undefined order, before presenting them to the programmer. I assume that's true for most server-side web frameworks.

https://docs.djangoproject.com/en/1....http.QueryDict

Last edited by dugan; 10-07-2017 at 02:18 PM.
 
1 members found this post helpful.
  


Reply

Tags
http, request-parameter, url


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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Log HTTP request mario.almeida Linux - Security 3 02-15-2011 10:59 AM
RPC request process order L1nuxn00b703 Solaris / OpenSolaris 1 03-02-2010 05:44 AM
In order to install all kinds of software for linux I have but one request alpha883 Linux - Software 6 04-29-2009 11:44 PM
request parameters contain both > and < pudhiyavan Linux - Software 0 02-22-2006 01:33 AM
http request mkamyar Linux - Software 5 08-30-2005 02:30 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 08:23 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration