[Varnish] #455: Make HTTP_HDR_MAX a ./configure option

Varnish varnish-bugs at projects.linpro.no
Sun Feb 22 23:32:45 CET 2009


#455: Make HTTP_HDR_MAX a ./configure option
-------------------------+--------------------------------------------------
 Reporter:  whocares     |        Owner:       
     Type:  enhancement  |       Status:  new  
 Priority:  normal       |    Milestone:       
Component:  build        |      Version:  trunk
 Severity:  normal       |   Resolution:       
 Keywords:  max headers  |  
-------------------------+--------------------------------------------------
Comment (by whocares):

 Well, I gave it a try and here's what I came up with:

 {{{
 # Define HTTP_HDR_MAX
 AC_ARG_WITH(max-header-fields,
             AS_HELP_STRING([--with-max-header-fields=NUM],
                            [How many header fields to support
 (default=32)]),
             [],
             [with_max_header_fields=32])

 if test $with_max_header_fields -lt 32; then
    with_max_header_fields=32
    AC_MSG_WARN([--with-max-header-fields increased to 32])
 fi

 if test $with_max_header_fields -gt 256; then
    with_max_header_fields=256
    AC_MSG_WARN([--with-max-header-fields decreased to 256])
 fi
 AC_DEFINE_UNQUOTED(HTTP_HDR_MAX, $with_max_header_fields, [Define maximum
 number of header fields supported by v
 arnish ])
 }}}

 Adapt and edit as you feel fit (I guess 256 is way too high, just used
 that for testing) and add to configure.ac. And if this snippet above is
 ugly as hell and makes any autoconf guru freak out: Sorry, that's my first
 go at this stuff - works for me, ymmv ;)

-- 
Ticket URL: <http://varnish.projects.linpro.no/ticket/455#comment:2>
Varnish <http://varnish.projects.linpro.no/>
The Varnish HTTP Accelerator


More information about the varnish-bugs mailing list