Setting custom response headers

Of course. Here is my configure command:
./configure --sbin-path=/usr/sbin --with-http_ssl_module
–conf-path=/etc/nginx --error-log-path=/var/log/nginx/error.log
–http-log-path=/var/log/nginx/access.log --with-http_perl_module
–prefix=/etc/nginx

I’ve noticed the “checking for perl” line this time (really don’t know
how I’ve missed it last time), and here’s the printout:
checking for perl

  • perl version: v5.8.8 built for i486-linux-gnu-thread-multi
    Note (probably harmless): No library found for -lperl
  • perl interpreter multiplicity found

the full printout is here: http://paste2.org/p/260873

Thanks Igor :wink:

Posted at Nginx Forum:

Hi every, I’m back :slight_smile:
It seems I need the header to be set in a different format, and look
like an expires date.
it currently gives:
User-Expires Mon Apr 12 03:52:54 2010

When the desired outcome should be:
Mon, 12 Apr 2010 03:52:54 GMT

Is there a way I can format the date to the expires date format? I’m
guessing it should be done in the perl function you suggested, but I
have no knowledge in perl and searching for perl date formatting just
flooded me with information I did not know how to use :slight_smile:

Posted at Nginx Forum:

On Thu, Jun 11, 2009 at 06:40:22AM -0400, ehudros2 wrote:

Of course. Here is my configure command:
./configure --sbin-path=/usr/sbin --with-http_ssl_module --conf-path=/etc/nginx --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --with-http_perl_module --prefix=/etc/nginx

I’ve noticed the “checking for perl” line this time (really don’t know how I’ve missed it last time), and here’s the printout:
checking for perl

  • perl version: v5.8.8 built for i486-linux-gnu-thread-multi
    Note (probably harmless): No library found for -lperl
  • perl interpreter multiplicity found

the full printout is here: http://paste2.org/p/260873

Probably, you need to set something like libperl-dev package.

slight bump :wink:
Can a perl monk help here?

Posted at Nginx Forum:

On Tue, Jun 16, 2009 at 04:07:18AM -0400, ehudros2 wrote:

Hi every, I’m back :slight_smile:
It seems I need the header to be set in a different format, and look like an expires date.
it currently gives:
User-Expires Mon Apr 12 03:52:54 2010

When the desired outcome should be:
Mon, 12 Apr 2010 03:52:54 GMT

Is there a way I can format the date to the expires date format? I’m guessing it should be done in the perl function you suggested, but I have no knowledge in perl and searching for perl date formatting just flooded me with information I did not know how to use :slight_smile:

You need to install Date::Manip module:

use Date::Manip qw(UnixDate);

$date = UnixDate(time(), “%a, %e %b %Y %H:%M:%S %z”);

Thanks Igor, your help on this issue so far is outstanding. I’ll give it
a try and post my results.

Posted at Nginx Forum: