Http protocol specification
Moderator: General Moderators
- Ollie Saunders
- DevNet Master
- Posts: 3179
- Joined: Tue May 24, 2005 6:01 pm
- Location: UK
Http protocol specification
This is one confusing mother yucker. Does anybody know of any translations or cheat sheets etc.?
-
alex.barylski
- DevNet Evangelist
- Posts: 6267
- Joined: Tue Dec 21, 2004 5:00 pm
- Location: Winnipeg
What is so yuck about it?
It's actually well documented...but finding what your after specifically is PITA...
The only thing that may throw off your average reader is the BNF grammar, as you need to understand how BNF works which ties into parsing, which is a fairly complicated subject...
Seirously though, unless you plan on writing an HTTP parser you don't need to worry about that formality...
It's a long read and some words are confusing...but you can really take short cuts...as what your reading is a standard protocol, if you take short cuts you introduce caveats into your code...
You may want to search Google for some "Introduction to HTTP" type articles, which will give you insight into how the HTTP process works...
It's actually well documented...but finding what your after specifically is PITA...
The only thing that may throw off your average reader is the BNF grammar, as you need to understand how BNF works which ties into parsing, which is a fairly complicated subject...
Seirously though, unless you plan on writing an HTTP parser you don't need to worry about that formality...
It's a long read and some words are confusing...but you can really take short cuts...as what your reading is a standard protocol, if you take short cuts you introduce caveats into your code...
You may want to search Google for some "Introduction to HTTP" type articles, which will give you insight into how the HTTP process works...
- Ollie Saunders
- DevNet Master
- Posts: 3179
- Joined: Tue May 24, 2005 6:01 pm
- Location: UK
Well that goes without saying.straight forward for me.
PITA?but finding what your after specifically is PITA...
That's a pretty good idea.You may want to search Google for some "Introduction to HTTP" type articles, which will give you insight into how the HTTP process works...
What is that?BNF grammar, as you need to understand how BNF works which ties into parsing, which is a fairly complicated subject...
-
alex.barylski
- DevNet Evangelist
- Posts: 6267
- Joined: Tue Dec 21, 2004 5:00 pm
- Location: Winnipeg
PITA = Pain in the a$$ole wrote:Well that goes without saying.straight forward for me.
PITA?but finding what your after specifically is PITA...
That's a pretty good idea.You may want to search Google for some "Introduction to HTTP" type articles, which will give you insight into how the HTTP process works...
What is that?BNF grammar, as you need to understand how BNF works which ties into parsing, which is a fairly complicated subject...
Understanding conceptually how HTTP works...will help 10 fold in understanding the technicalities of the actual protocol...
BNF...hmmmm....hard to explain...as I'm not an expert myself, but only a passionate programmer who once had a thing for natural language parsing
BNF...is a meta-syntax or meta-language...in that it's more of an abstraction on current programming languages...it's a language which is used to express the grammar of a context free language...
BNF is a language which is passed to a compiler-compiler like Yacc or Bison which takes the (E)BNF, etc and actually writes fast, efficient parsing C/PHP/Perl code...
You write BNF instead of complex parsing code, because it's more human readable...than tweaked parsing code...so basically it takes the BNF grammar and outputs the parsing code for you...which you can then use in a language like C, etc...
Thats why I say it's an abstraction on programming languages...much like SQL abstracts the idea of working with structured data from in the way of SQL statements (avoiding writing complex queries by hand) BNF does much the same, but it's compiled into the native language instead of interpreted at runtime, likely because of performance when parsing is a *big* issue and a language grammar isn't likel to change at runtime...as that could lead to some serious polymorphic, convoluted spaghetti code
BNF is commonly used when describing the exact syntax of a language, protocol, etc...because it provides a standardized way of describing something this complex...
If you were to implement a HTTP server, you would use the BNF like a blue print in parsing the HTTP...or if you wanted to know the *exact* format of HTTP headers, etc...
Complex subject
- Ollie Saunders
- DevNet Master
- Posts: 3179
- Joined: Tue May 24, 2005 6:01 pm
- Location: UK
Hockey, you sure know how to ramble. I found this http://en.wikipedia.org/wiki/Backus-Naur_Form which has actually made things clearer. Thanks for bringing my attention to it.
So I guess this is what w3c used before SGML.Wikipedia wrote:Document Type Definition (DTD) replaces BNFs in many contexts.
-
alex.barylski
- DevNet Evangelist
- Posts: 6267
- Joined: Tue Dec 21, 2004 5:00 pm
- Location: Winnipeg
Ramble? I prefer brain storming 
Parsing is an interesting field...you want to search for books by a fellow named Donald Knuth...although I'll be honest...he's incredibly difficult to understand...
In his books preface, he says his intended audience is students going for their PhD's to the average laymen intersted in natural language processing (NLP). His books aren't meant for laymen...i've read one of his damn books about a dozen times and I still don't get it...
He has a PDF version available...I'm trying to find it on my PC...stupid complex, but an interesting read(ing - in my case)
Although unlike design patterns, which apply to the everyday programmer...parsing is a complex subject intended for an esoteric few...unless your just interested, I wouldn't recommend learning it to further your career, as you won't get a job writing parsers anywhere without BSc. in computer science...
Most compe sci. guys I know didn't even touch parsing...thats usually reserved for masters so I understand...
I've tried selling myself on knowing the basics of EBNF and parser frameworks like boost Spirit...natta...nuttin...zip...they didn't even know WTF it was at most places...
So unless your gonna work at Google...you'd be better off spending time reading some practical...like design...security, etc...
Unless of course really want to read up on it...like me...just don't get your hopes up when you want a job doing it is all
Anyways enough being negative...but I wish someone had told me that a few years ago is all
But...it never hurts to have additional non-practical skills...hell knows...I have a tonne...
Useless impractical information is nice to have... 
Again, I've brainstormed...haven't I???
Cheers
Parsing is an interesting field...you want to search for books by a fellow named Donald Knuth...although I'll be honest...he's incredibly difficult to understand...
In his books preface, he says his intended audience is students going for their PhD's to the average laymen intersted in natural language processing (NLP). His books aren't meant for laymen...i've read one of his damn books about a dozen times and I still don't get it...
He has a PDF version available...I'm trying to find it on my PC...stupid complex, but an interesting read(ing - in my case)
Although unlike design patterns, which apply to the everyday programmer...parsing is a complex subject intended for an esoteric few...unless your just interested, I wouldn't recommend learning it to further your career, as you won't get a job writing parsers anywhere without BSc. in computer science...
Most compe sci. guys I know didn't even touch parsing...thats usually reserved for masters so I understand...
I've tried selling myself on knowing the basics of EBNF and parser frameworks like boost Spirit...natta...nuttin...zip...they didn't even know WTF it was at most places...
So unless your gonna work at Google...you'd be better off spending time reading some practical...like design...security, etc...
Unless of course really want to read up on it...like me...just don't get your hopes up when you want a job doing it is all
Anyways enough being negative...but I wish someone had told me that a few years ago is all
But...it never hurts to have additional non-practical skills...hell knows...I have a tonne...
Again, I've brainstormed...haven't I???
Cheers