Re: httpd header macros

prx <[email protected]>
Newsgroups gmane.os.openbsd.misc
Message-ID <[email protected]>
* Rafael Sadowski <[email protected]> le [26-08-2026 17:28:37 +0200]:
> On Mon Aug 24, 2026 at 09:01:11AM +0200, prx wrote:
> > Hello,
> > 
> > The new "header" instruction in httpd.conf is very handy, thank you very
> > much for this!
> > 
> > However, when I tried to set an "Onion-Location" header, I found macros
> > aren't supported.
> > 
> > ```
> > header set "Onion-Location" "http://foo.onion$REQUEST_URI"
> > ```
> > 
> > $REQUEST_URI is not expanded.
> > 
> > Do I misunderstand something ?
> > 
> > regards
> > 
> 
> No you don't. Macros are not yet supported. I'll have a look and think
> about this request.
> 
> Thanks for the report.
> 

I looked at souces of httpd.
For what I understand, it seemds httpd store headers while reading
configuration, then inject them in every response.

To handle macros, some headers should be reevaluaed at each request, as
it's done for FastCGI.

I'm not confident enough and had found enough time to suggest a patch now.
Thank you for your king reply and your interest into this.

Regards.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.