Page 1 of 1

Http protocol specification

Posted: Thu Aug 24, 2006 7:54 pm
by Ollie Saunders
This is one confusing mother yucker. Does anybody know of any translations or cheat sheets etc.?

Posted: Thu Aug 24, 2006 8:00 pm
by feyd
pretty straight forward for me. :)

Posted: Thu Aug 24, 2006 8:08 pm
by alex.barylski
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...

Posted: Thu Aug 24, 2006 8:19 pm
by Ollie Saunders
straight forward for me.
Well that goes without saying.
but finding what your after specifically is PITA...
PITA?
You may want to search Google for some "Introduction to HTTP" type articles, which will give you insight into how the HTTP process works...
That's a pretty good idea.
BNF grammar, as you need to understand how BNF works which ties into parsing, which is a fairly complicated subject...
What is that?

Posted: Thu Aug 24, 2006 8:46 pm
by alex.barylski
ole wrote:
straight forward for me.
Well that goes without saying.
but finding what your after specifically is PITA...
PITA?
You may want to search Google for some "Introduction to HTTP" type articles, which will give you insight into how the HTTP process works...
That's a pretty good idea.
BNF grammar, as you need to understand how BNF works which ties into parsing, which is a fairly complicated subject...
What is that?
PITA = Pain in the a$$

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 :P

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 :P

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 :?

Posted: Thu Aug 24, 2006 8:53 pm
by Ollie Saunders
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.
Wikipedia wrote:Document Type Definition (DTD) replaces BNFs in many contexts.
So I guess this is what w3c used before SGML.

Posted: Thu Aug 24, 2006 9:43 pm
by alex.barylski
Ramble? I prefer brain storming :P

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... :P

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 :P

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... :P Useless impractical information is nice to have... :)

Again, I've brainstormed...haven't I??? :)

Cheers :)