NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: bin/58880: bozohttpd(8): set custom header field in responses



The following reply was made to PR bin/58880; it has been noted by GNATS.

From: Martin Husemann <martin%duskware.de@localhost>
To: gnats-bugs%netbsd.org@localhost
Cc: mrg%netbsd.org@localhost, gnats-admin%netbsd.org@localhost, netbsd-bugs%netbsd.org@localhost,
	campbell+netbsd%mumble.net@localhost
Subject: Re: bin/58880: bozohttpd(8): set custom header field in responses
Date: Fri, 13 Dec 2024 09:30:57 +0100

 Just a tangential node:
 
  - if we always want to send all headers verbatim, it would be simpler to
    create a single malloc() for the whole header file and make sure it has
    no empty lines in it when reading, then just write it out in one
    call. Gets rid of the simpleque and the iterations.
 
  - if we consider doing value replacements later (not sure if that could
    be usefull and what values to offer in that context) it would be easier
    if we would parse the file into header and value pairs, unwrap continuation
    lines and have them in a struct with header/value pointer on the simpleque.
 
 Do other servers offer some kind of right-hand-side (value) string 
 substitutions for this?
 
 Martin
 


Home | Main Index | Thread Index | Old Index