0
votes

According this document: http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.1 Accept header is built as:

   Accept         = "Accept" ":"
                    #( media-range [ accept-params ] )

   media-range    = ( "*/*"
                    | ( type "/" "*" )
                    | ( type "/" subtype )
                    ) *( ";" parameter )
   accept-params  = ";" "q" "=" qvalue *( accept-extension )
   accept-extension = ";" token [ "=" ( token | quoted-string ) ]

A sample:

   Accept: text/plain; q=0.5, text/html,
           text/x-dvi; q=0.8, text/x-c

I think there could be many combinations... is there a fixed number of possible combinations that make Accept header max length able to be calculated?

or there are many combinations and it is better to store it as VARCHAR(MAX) in a database column?

1

1 Answers

0
votes

a) You're citing an outdated document. You really want to look at http://greenbytes.de/tech/webdav/draft-ietf-httpbis-p1-messaging-26.html and http://greenbytes.de/tech/webdav/draft-ietf-httpbis-p2-semantics-26.html.

b) No, there are no fixed limits on header field sizes; in particular not for individual headers. See http://greenbytes.de/tech/webdav/draft-ietf-httpbis-p1-messaging-26.html#rfc.section.3.2.5 for more information.