Problem mit FCGI und Perl

2014-07-10 Thread Michael Wenko
Hallo,

ich möchte in Perl (FCGI.pm) unter Umständen die FCGI Schleife (while 
fcgi-Accept) verlassen und die Instanz, die den letzten Request bearbeitet 
hat, zu beenden.
Dazu verlasse ich die Schleife derzeit mit last:

while( $fcgirequest-Accept ) {

...

if( $beendeDich ) {
last;
} 

}

Dies führt unter Umständen dazu, dass die Antwort auf den Request den Client 
nicht mehr erreicht und stattdessen der Apache einen 500 Fehler an den Client 
schickt, obwohl
der Prozess erst beendet wird, nachdem die vollständige Antwort an den Client 
geschrieben wurde. Ich habe schon probiert dem FCGI Objekt einen Hint zu 
schicken, dass die
Antwort vollständig ist: $fcgirequest-Finish() Aber das bewirkt nicht, dass 
der Client die Antwort anzeigt.

Apache ist Version 2.2.15.

Hat jemand eine Hinweis, wieso diese Vorgehensweise problematisch ist oder wie 
man auf besser Art und Weise den Lebenszyklus einer Instanz beenden sollte?



Mit freundlichen Grüßen,
Michael Wenko


--
ECCE TERRAM Internet Services GmbH
Michael Wenko
An der grossen Wisch 36, D-26133 Oldenburg
phone: +49 441 500 120, fax: +49 441 500 1229
OL HRB 3757, GL: F. Simon

Social Media is like teen sex. Everyone wants to do it. Nobody knows how. When 
its finally done there is surprise it's not better. Avianash Kaushik



signature.asc
Description: Message signed with OpenPGP using GPGMail


[users@httpd] Apache cgid:error for HTML::Template::Pro templates larger than 8k

2014-07-10 Thread Tom Phan
My web server: FreeBSD 10.0, Apache 2.4, Perl 5.16, HTML::Template::Pro 0.9510
 
When I try to run any perl script calling HTML::Template::Pro templates larger 
than 8,191 bytes, I get following error in httpd:
 
[cgid:error] malformed header from script 'test.pl': Bad header: !doctype html
 
Running the script from command line (even with template files of several MBs 
in size) produces the expected output and no error, so I am suspecting that the 
cause of the error is related to Apache.
 
Here is the simple perl script 'test.pl' that I tested with:
 
#!/usr/bin/perl
use strict;
use HTML::Template::Pro;
my $tmpl = HTML::Template::Pro - new(filename = 'test.tmpl');
print Content-Type: text/html\n\n;
$tmpl - output();
 
..and the HTML::Template::Pro template 'test.tmpl':
 
!doctype html
html
 body
  pblah blah/p
 /body
/html
 
I ran test.pl in the browser and everything was fine at first, no error. Then I 
started adding a lot of blah blahs to the template file until the size of the 
template file hit exactly 8,192 bytes, at which time it crashed with a 500 and 
with the above error logged in the httpd-error.log. If I delete even a single 
character from the template file so it goes below 8K, the script runs again. I 
have absolutely no idea why this happens. By the way, large html files do not 
crash Apache, nor do Perl scripts printing html code directly (without 
HTML::Template::Pro. I tried both to the extreme, creating MBs of html code and 
wasn't able to crash anything at all.
 
If I switch to mod_cgi instead of mod_cgid, the error appears exactly when 
template file hits 4K in size. So it is 8K for mod_cgid and 4K for mod_cgi.
 
What is it in Apache that imposes such limits on the size of my templates and 
how can I lift/increase them?

[users@httpd] Hiding Query Strings

2014-07-10 Thread Otis Dewitt - NOAA Affiliate
Greetings,

I am having a problem hiding query strings:

Example:

Change:
http://www.fishfry.gov/pls/webpls/car_1.data_in?jtype=IMPjmnth=01jyear=2014jcountry=USAjoutput=TABLE

To Show: http://www.fishfry.gov on query return instead of showing the
complete URL as above to help mitigate the public trying different
years,country,output from the URL.

Is there a way to solve this as a re-write?

Thanks,
Otis


Re: [users@httpd] Hiding Query Strings

2014-07-10 Thread Stormy

At 01:16 PM 7/10/2014 -0400, Otis Dewitt - NOAA Affiliate wrote:

Greetings,

I am having a problem hiding query strings:

Example:

Change: 
http://www.fishfry.gov/pls/webpls/car_1.data_in?jtype=IMPjmnth=01jyear=2014jcountry=USAjoutput=TABLEhttp://www.fishfry.gov/pls/webpls/car_1.data_in?jtype=IMPjmnth=01jyear=2014jcountry=USAjoutput=TABLE


To Show: http://www.fishfry.govhttp://www.fishfry.gov on query return 
instead of showing the complete URL as above to help mitigate the public 
trying different years,country,output from the URL.


Is there a way to solve this as a re-write?


Counterintuitive?  How could I reference your specific document in an 
email, journal, webpage, report, whatever?


Paul


-
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org



[users@httpd] Apache cgid:error for HTML::Template::Pro templates larger than 8k

2014-07-10 Thread Tom Phan
My web server: FreeBSD 10.0, Apache 2.4, Perl 5.16, HTML::Template::Pro 0.9510

When I try to run any perl script calling HTML::Template::Pro templates larger 
than 8,191 bytes, I get following error in httpd:

[cgid:error] malformed header from script 'test.pl': Bad header: !doctype html

Running the script from command line does produce the expected output and no 
error, so I am assuming the cause of the error is related to Apache.

Here is the simple perl script 'test.pl' that I tested with:

#!/usr/bin/perl
use strict;
use HTML::Template::Pro;
my $tmpl = HTML::Template::Pro - new(filename = 'test.tmpl');
print Content-Type: text/html\n\n;
$tmpl - output();

..and the HTML::Template::Pro template 'test.tmpl':

!doctype html
html
body
pblah blah/p
/body
/html

I ran test.pl in the browser and everything was fine at first, no error. Then I 
started adding a lot of blah blahs to the template file until the size of the 
template file hit exactly 8,192 bytes, at which time it crashed with a 500 and 
with the above error logged in the httpd-error.log. If I delete even a single 
character from the template file so it goes below 8K, the script runs again. I 
have absolutely no idea why this happens. By the way, large html files do not 
crash Apache, nor do Perl scripts printing html code directly (without 
HTML::Template::Pro. I tried both to the extreme, creating MBs of html code and 
wasn't able to crash anything at all.

If I switch to mod_cgi instead of mod_cgid, the error appears exactly when 
template file hits 4K in size. So it is 8K for mod_cgid and 4K for mod_cgi.

What is it in Apache that imposes such limits on the size of my templates and 
how can I lift/increase them?

[users@httpd] HTTPS Proxy with Apache

2014-07-10 Thread fabio . schmidt

Hi !

I'm trying to use Apache 2.2 to proxy connections to a server that only listens 
with HTTPS (Citrix Secure Gateway, to be more precise) and keep the connection 
encrypted. I've already enabled the proxy, proxy_http and proxy_connect modules 
but when I access through my Apache server I got the message 
ERR_SSL_PROTOCOL_ERROR.

What am I misunderstanding and if someone could explain to me the correct way 
to achieve a proxy with a HTTPSHTTPS connection I would really appreciate !

Here is my configuration:

VirtualHost *:443
   SSLEngine ON 
   SSLProxyEngine ON
   ProxyPass / https://IP_OF_THE_CITRIX_SERVER/
   ProxyPassReverse / https://IP_OF_THE_CITRIX_SERVER/
LogLevel debug
ErrorLog /var/log/apache2/citrix-ssl-error.log
TransferLog /var/log/apache2/citrix-ssl-access.log
/VirtualHost


Atenciosamente,
Fabio S. Schmidt
Consultor técnico Sênior
4linux - Open Software Specialists
http://www.4linux.com.br

-
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org