Re: [PATCH] No temporary file left behind

2006-05-28 Thread Ruediger Pluem


On 05/28/2006 03:52 AM, Davi Arnaut wrote:
 Hi,
 
 Remove mod_disk_cache temporary files when rename() fails, otherwise
 they may accumulate in excess. 

Thanks for the patch. Committed to trunk as r409942 
(http://svn.apache.org/viewvc?rev=409942view=rev).

Regards

Rüdiger




about mod_proxy_fcgi....

2006-05-28 Thread Mathieu CARBONNEAUX
Hi,

Have developed for apache v2.0 a mod_proxy_fcgi 
(http://mproxyfcgi.sourceforge.net) like mod_proxy_ajp of Apache 2.2…
And later have seen some have developed the same thing in 2.3 dev tree…

My need is real fastcgi proxy (mod_fastcgi make very bad job in this way!) on 
apache 2.0…

Ok, but if it possible to work together on the different problem I've seen and 
on what I'm working to correct…

- 1 -
All fastcgi server implementation hare based on fastcgi spec…
And are based on mod_fastcgi logic, and mod_fastcgi send only script to fastcgi 
server to execute…
No gif, jpeg or other files
And for example php fastcgi send systematically text/html for all file…

For that have try to use mime_magic without success, I'm not sure but I think 
mime magic not work with proxy module (hook after proxy ?!!)...
I've not investigated too I source to see why mime magic don’t whant to correct 
mime type... I'm not sure if actually can do that...

Trying to correct mime type on apache proxy is only a temporally solution, the 
ideal solution is to modify server fastcgi implementation to set correctly the 
mime type on each file it serv...

And after I'm not sure all fastcgi implementation of scripting language can 
correctly manage other file than script without problem...
Php seem to accept correctly that type of file... but he tries to interpret all 
file not just php file... is not the good way...
I think is necessary to modify fastcgi implementation to manage a filter to 
send directly file if not have the good extension...
To prevent bad interpretation of file that is in binary format...and over cpu 
on fastcgi server to try to interpret script on any binary file...

- 2 -
In mod_fastcgi the index searching are managed by apache… not by the fastcgi 
server…
If you try to go to http://myserverhttp/myappfcgi/ (with PassReverse /myappfcgi 
fcgi://myfcgiserver:1)
You receive no imput file error from php... because is a directory...
And php not manage the fact if index.php (or other index) exists...

Is a possibility to mod_proxy_fcgi to try any index, 404 errors on file 
terminated by /... but is time consuming to send each time a request to check 
if index.xxx exists...
But is a temporary solution, and also on this problem the good way is to modify 
fastcgi server to implement index searching option...

Have maked a patch for php to do that (hard coded...no option to set index file 
list... for the moment...), and it work fine!
I will post on sourceforge in the next week...

- 3 -
fastcgi implementation define the possibility (define actually this var : 
FCGI_MAX_CONNS,FCGI_MAX_REQS,FCGI_MPXS_CONNS) to get parameter value from 
fastcgi server with FCGI_GET_VALUES management record...
To generate PATHTRANSLATED correctly to the target fastcgi server tree...

My idea is to add new VALUE to get (at proxy first connection to that 
server...!?) from fastcgi server is the DOCUMENT_ROOT to base the 
PATHTRANSLATED generation on automatically it...

In other way, I'm adding the possibility to force target DocumentRoot in apache 
proxy module by configuration option...

- 4 -
The fastcgi specification make possible to manage keepalive (and the 
possibility to mux different request in one connexion!)...
But any implementation has seen of this protocol don’t use it: mod_fastcgi, 
lighttpd, mod_fcgid, the 2.3 mod_proxy_fcgi, all close connection after each 
request...

It is to be regretted that not possible to do that...

Have tried to do keepalive with php, and some time have fastcgi record of other 
request (have used real different id on each request from apache request id)...

I go to try to send systematically FCGI_ABORT_REQUEST management record if 
apache abort request and wait for FCGI_END_REQUEST ... 
But I'm not sure that will work...

The ideal is to have packet system (fastcgi use record like packet...) attach 
to a pool of connexion...
Based on bucket implementation (that only handle FastCGI header...)??! Each 
bucket = fastcgi record (have seen some thing like that in mod_fcgid?...)!!!?? 
How to do that??!!
Packet systems that send only record based on request id to the good proxy 
handle have begun the fastcgi request...


- 5 -
Fastcgi implementations specify the possibility (FCGI_KEEP_CONN on 
FCGI_BeginRequestBody struct field flags) on FCGI_BEGIN_REQUEST record to 
specify the socket close mode...
Actually all implementation I've seen force close from FastCGI client (apache 
side)...

I'm not sure is a good thing to close on apache side... (Generate many TIME 
WAIT on FastCGI server side...)

Have tried to use FastCGI server close side...
But not receive the end of the request (on php implementation, have not tested 
other one...)...
But I've not found why php don’t send the end of the request...


The 1 and 2 are major problem, 3 are moderated problem, and 4 and 5 are minor...

I'm very interested on you idea on this problem...

Best regards,
Mathieu



Re: svn commit: r409942 - in /httpd/httpd/trunk: CHANGES modules/cache/mod_disk_cache.c

2006-05-28 Thread Colm MacCarthaigh
On Sun, May 28, 2006 at 10:32:04AM -, [EMAIL PROTECTED] wrote:
  rv = apr_file_rename(dobj-tempfile, dobj-datafile, r-pool);
  if (rv != APR_SUCCESS) {
 -/* XXX log */
 +ap_log_error(APLOG_MARK, APLOG_DEBUG, rv, r-server,
 + disk_cache: rename tempfile to datafile failed:
 +  %s - %s, dobj-tempfile, dobj-datafile);
 +apr_file_remove(dobj-tempfile, r-pool);
  }

A significant source of this kind of error is that the filesystem
suddenly becomes read-only. Either to a protective automative re-mount
by the kernel, a log journal becoming full, in which case the remove
will also fail :/

-- 
Colm MacCárthaighPublic Key: [EMAIL PROTECTED]


Re: svn commit: r409942 - in /httpd/httpd/trunk: CHANGES modules/cache/mod_disk_cache.c

2006-05-28 Thread Ruediger Pluem


On 05/28/2006 02:33 PM, Colm MacCarthaigh wrote:
 On Sun, May 28, 2006 at 10:32:04AM -, [EMAIL PROTECTED] wrote:

 
 A significant source of this kind of error is that the filesystem
 suddenly becomes read-only. Either to a protective automative re-mount
 by the kernel, a log journal becoming full, in which case the remove
 will also fail :/

Thats true, but

1. In this case no further temporary files get created anyway.
2. Trying to remove it does not really hurt, even if it fails.

OTH if becoming read-only is not the source of the error we clean things up.


Regards

Rüdiger


Re: conclusions to FAQs on mod_proxy_ajp vs. mod_jk?

2006-05-28 Thread Jeff Trawick

On 5/27/06, Ruediger Pluem [EMAIL PROTECTED] wrote:



On 05/27/2006 03:58 PM, Jeff Trawick wrote:


 Are there still fundamental pieces missing from mod_proxy_ajp +
 mod_proxy_balancer which have to be resolved before mod_proxy_ajp is
 the natural solution for anybody on Apache = 2.2?

Currently mod_proxy_balancer lacks the domain feature of mod_jk, but I do
not know if this is regarded as fundamental piece.


shrug


 Isn't pass-through of client SSL connection information another
 problem with mod_proxy?  (servlets can't access cipher or client
 certificate)

AFAIK not with mod_proxy_ajp. It seems to pass all these information to Tomcat.


oops, I meant ... problem with using generic HTTP support with
mod_proxy -- mod_proxy_http; I agree, the functional problem doesn't
apply to mod_proxy_ajp


Re: conclusions to FAQs on mod_proxy_ajp vs. mod_jk?

2006-05-28 Thread Ruediger Pluem


On 05/28/2006 03:18 PM, Jeff Trawick wrote:
 On 5/27/06, Ruediger Pluem  wrote:
 


 On 05/27/2006 03:58 PM, Jeff Trawick wrote:

 
  Are there still fundamental pieces missing from mod_proxy_ajp +
  mod_proxy_balancer which have to be resolved before mod_proxy_ajp is
  the natural solution for anybody on Apache = 2.2?

 Currently mod_proxy_balancer lacks the domain feature of mod_jk, but I do
 not know if this is regarded as fundamental piece.

Other things I noticed that are different:

1. mod_jk's recycle_timeout and cache_timeout are not exactly matched by 
mod_proxy's
   smax and ttl. But from my current personal point of view this does not 
matter.

2. mod_proxy_ajp does miss mod_jk's secret options. Again not critical from my 
point of view.

3. Currently connections are not checked if they are healthy *before* a request 
is send
   (something like mod_jk's connect_timeout, prepost_timeout). I think this 
would be nice to have,
   but I guess it is not easy to do this in a protocol independent way. So this 
might be only
   subject to implementation in mod_proxy_ajp.

4. There is no match for mod_jk's recovery_options currently. Furthermore I 
think some research
   needs to be done about mod_proxy's current behaviour in this situation. I 
guess this is important
   to prevent things being twice in your basket :-).


  Isn't pass-through of client SSL connection information another
  problem with mod_proxy?  (servlets can't access cipher or client
  certificate)

 AFAIK not with mod_proxy_ajp. It seems to pass all these information
 to Tomcat.
 
 
 oops, I meant ... problem with using generic HTTP support with
 mod_proxy -- mod_proxy_http; I agree, the functional problem doesn't

I do not know if there is any standard in passing such information to the 
backend
via HTTP, but I think you can pick up all SSL information that is available as 
env
variables and add them as request headers to the backend request via 
mod_headers.
Is this a sufficient solution for the problem?

Regarding mod_proxy_http the following TODO's come up to my mind:

1. Currently we cannot handle keepalive connections to SSL backends.
2. There are some problems if the backend closes a keepalive connection by 
itself
   due to a timeout. See also:

  http://mail-archives.apache.org/mod_mbox/httpd-dev/200602.mbox/[EMAIL 
PROTECTED]
  http://mail-archives.apache.org/mod_mbox/httpd-dev/200602.mbox/[EMAIL 
PROTECTED]

  and PR3770 (http://issues.apache.org/bugzilla/show_bug.cgi?id=37770).


Regards

Rüdiger



Bug report for Apache httpd-1.3 [2006/05/28]

2006-05-28 Thread bugzilla
+---+
| Bugzilla Bug ID   |
| +-+
| | Status: UNC=Unconfirmed NEW=New ASS=Assigned|
| | OPN=ReopenedVER=Verified(Skipped Closed/Resolved)   |
| |   +-+
| |   | Severity: BLK=Blocker CRI=CriticalMAJ=Major |
| |   |   MIN=Minor   NOR=Normal  ENH=Enhancement   |
| |   |   +-+
| |   |   | Date Posted |
| |   |   |  +--+
| |   |   |  | Description  |
| |   |   |  |  |
| 8329|New|Nor|2002-04-20|mime_magic gives 500 and no error_log on Microsoft|
| 8372|Ass|Nor|2002-04-22|Threadsaftey issue in Rewrite's cache [Win32/OS2/N|
| 8849|New|Nor|2002-05-07|make install errors as root on NFS shares |
| 8882|New|Enh|2002-05-07|[PATCH] mod_rewrite communicates with external rew|
| 9037|New|Min|2002-05-13|Slow performance when acessing an unresolved IP ad|
| 9126|New|Blk|2002-05-15|68k-next-openstep v. 4.0  |
| 9726|New|Min|2002-06-09|Double quotes should be flagged as T_HTTP_TOKEN_ST|
| 9894|New|Maj|2002-06-16|getline sub in support progs collides with existin|
| |New|Nor|2002-06-19|Incorrect default manualdir value with layout.|
|10038|New|Min|2002-06-20|ab benchmaker hangs on 10K https URLs with keepali|
|10073|New|Maj|2002-06-20|upgrade from 1.3.24 to 1.3.26 breaks include direc|
|10166|Opn|Min|2002-06-24|HTTP/1.1 proxy requests made even when client make|
|10169|New|Nor|2002-06-24|Apache seg faults due to attempt to access out of |
|10178|New|Maj|2002-06-24|Proxy server cuts off begining of buffer when spec|
|10195|New|Nor|2002-06-24|Configure script erroneously detects system Expat |
|10199|New|Nor|2002-06-24|Configure can't handle directory names with unders|
|10243|New|Maj|2002-06-26|CGI scripts not getting POST data |
|10354|New|Nor|2002-06-30|ErrorDocument(.htaccess) fails when passed URL wit|
|10446|Opn|Blk|2002-07-03|spaces in link to http server seen as foreign char|
|10666|New|Enh|2002-07-10|line-end comment error message missing file name  |
|10744|New|Nor|2002-07-12|suexec might fail to open log file|
|10747|New|Maj|2002-07-12|ftp SIZE command and 'smart' ftp servers results i|
|10760|New|Maj|2002-07-12|empty ftp directory listings from cached ftp direc|
|10939|New|Maj|2002-07-18|directory listing errors  |
|11020|New|Maj|2002-07-21|APXS only recognise tests made by ./configure |
|11236|New|Min|2002-07-27|Possible Log exhaustion bug?  |
|11265|New|Blk|2002-07-29|mod_rewrite fails to encode special characters|
|11765|New|Nor|2002-08-16|.apaci.install.tmp installs in existing httpd.conf|
|11986|New|Nor|2002-08-23|Restart hangs when piping logs on rotation log pro|
|12096|New|Nor|2002-08-27|apxs does not handle binary dists installed at non|
|12574|New|Nor|2002-09-12|Broken images comes from mod_proxy when caching ww|
|12583|New|Nor|2002-09-12|First piped log process do not handle SIGTERM |
|12598|Opn|Maj|2002-09-12|Apache hanging in Keepalive State |
|12770|Opn|Nor|2002-09-18|ErrorDocument fail redirecting error 400  |
|13188|New|Nor|2002-10-02|does not configure correctly for hppa64-hp-hpux11.|
|13274|Ass|Nor|2002-10-04|Subsequent requests are destroyed by the request e|
|13607|Opn|Enh|2002-10-14|Catch-all enhancement for vhost_alias?|
|13687|New|Min|2002-10-16|Leave Debug symbol on Darwin  |
|13822|New|Maj|2002-10-21|Problem while running Perl modules accessing CGI::|
|14095|Opn|Nor|2002-10-30|Change default Content-Type (DefaultType) in defau|
|14250|New|Maj|2002-11-05|Alternate UserDirs don't work intermittantly  |
|14443|New|Maj|2002-11-11|Keep-Alive randomly causes TCP RSTs   |
|14448|Opn|Cri|2002-11-11|Apache WebServer not starting if installed on Comp|
|14518|Opn|Nor|2002-11-13|QUERY_STRING parts not incorporated by mod_rewrite|
|14670|New|Cri|2002-11-19|Apache didn't deallocate unused memory|
|14748|New|Nor|2002-11-21|Configure Can't find DBM on Mac OS X  |
|15011|New|Nor|2002-12-03|Apache processes not timing out on Solaris 8  |
|15028|New|Maj|2002-12-03|RedirectMatch does not escape properly|
|16013|Opn|Nor|2003-01-13|Fooling mod_autoindex + IndexIgnore   |
|16236|New|Maj|2003-01-18|Include directive in Apache is not parsed within c|
|16241|New|Maj|2003-01-19|Apache processes takes 100% CPU until killed manua|

Bug report for Apache httpd-2 [2006/05/28]

2006-05-28 Thread bugzilla
+---+
| Bugzilla Bug ID   |
| +-+
| | Status: UNC=Unconfirmed NEW=New ASS=Assigned|
| | OPN=ReopenedVER=Verified(Skipped Closed/Resolved)   |
| |   +-+
| |   | Severity: BLK=Blocker CRI=CriticalMAJ=Major |
| |   |   MIN=Minor   NOR=Normal  ENH=Enhancement   |
| |   |   +-+
| |   |   | Date Posted |
| |   |   |  +--+
| |   |   |  | Description  |
| |   |   |  |  |
| 7483|Ass|Enh|2002-03-26|Add FileAction directive to assign a cgi interpret|
| 7741|Ass|Nor|2002-04-04|some directives may be placed outside of proper co|
| 7862|New|Enh|2002-04-09|suexec never log a group name.|
| 8483|Inf|Min|2002-04-24|apache_2.0 .msi installer breaks .log and .conf fi|
| 8713|New|Min|2002-05-01|No Errorlog on PROPFIND/Depth:Infinity|
| 8925|New|Cri|2002-05-09|Service Install (win32 .msi/.exe) fails for port i|
| 9727|New|Min|2002-06-09|Double quotes should be flagged as T_HTTP_TOKEN_ST|
| 9903|Opn|Maj|2002-06-16|mod_disk_cache does not remove temporary files|
| 9945|New|Enh|2002-06-18|[PATCH] new funtionality for apache bench |
|10114|Ass|Enh|2002-06-21|Negotiation gives no weight to order, only q value|
|10154|Ass|Nor|2002-06-23|ApacheMonitor interferes with service uninstall/re|
|10722|Opn|Nor|2002-07-12|ProxyPassReverse doesn't change cookie paths  |
|10775|Ass|Cri|2002-07-13|SCRIPT_NAME wrong value   |
|10932|Opn|Enh|2002-07-18|Allow Negative regex in LocationMatch |
|11035|New|Min|2002-07-22|Apache adds double entries to headers generated by|
|11294|New|Enh|2002-07-30|desired vhost_alias option|
|11427|Opn|Maj|2002-08-02|Possible Memory Leak in CGI script invocation |
|11540|Opn|Nor|2002-08-07|ProxyTimeout ignored  |
|11580|Opn|Enh|2002-08-09|generate Content-Location headers |
|11971|Opn|Nor|2002-08-23|HTTP proxy header Via with wrong hostname if Ser|
|11997|Opn|Maj|2002-08-23|Strange critical errors possibly related to mpm_wi|
|12033|Opn|Nor|2002-08-26|Graceful restart immidiately result in [warn] long|
|12340|Opn|Nor|2002-09-05|WindowsXP proxy, child process exited with status |
|12680|New|Enh|2002-09-16|Digest authentication with integrity protection   |
|12885|New|Enh|2002-09-20|windows 2000 build information: mod_ssl, bison, et|
|13029|New|Nor|2002-09-26|Win32 mod_cgi failure with non-ASCII characters in|
|13101|Inf|Cri|2002-09-27|Using mod_ext_filter with mod_proxy and http/1.1 c|
|13599|Ass|Nor|2002-10-14|autoindex formating broken for multibyte sequences|
|13603|New|Nor|2002-10-14|incorrect DOCUMENT_URI in mod_autoindex with Heade|
|13661|Ass|Enh|2002-10-15|Apache cannot not handle dynamic IP reallocation  |
|13946|Inf|Nor|2002-10-24|reverse proxy errors when a document expires from |
|13986|Ass|Enh|2002-10-26|remove default MIME-type  |
|14016|Inf|Nor|2002-10-28|Problem when using mod_ext_filter with ActivePerl |
|14090|New|Maj|2002-10-30|mod_cgid always writes to main server error log   |
|14104|Opn|Enh|2002-10-30|not documented: must restart server to load new CR|
|14206|New|Maj|2002-11-04|DirectoryIndex circumvents -FollowSymLinks option |
|14227|Ass|Nor|2002-11-04|Error handling script is not started (error 500) o|
|14496|New|Enh|2002-11-13|Cannot upgrade 2.0.39 - 2.0.43. Must uninstall fi|
|14556|Inf|Nor|2002-11-14|mod_cache with mod_mem_cache enabled doesnt cash m|
|14858|New|Enh|2002-11-26|mod_cache never caches responses for requests requ|
|14922|Ass|Enh|2002-11-28|target is currently hardcoded to 'apache2'  |
|15045|Ass|Nor|2002-12-04|addoutputfilterbytype doesn't work for defaulted t|
|15233|Opn|Nor|2002-12-10|move AddType application/x-x509-ca-cert from ssl.c|
|15235|New|Nor|2002-12-10|add application/x-x509-email-cert, application/x-x|
|15625|New|Nor|2002-12-23|mention mod_ssl in http://nagoya.apache.org/dist/h|
|15626|New|Nor|2002-12-23|mention which modules are part of the (binary) dis|
|15631|New|Nor|2002-12-23|mention in httpd.conf that mod_ssl is not included|
|15719|Inf|Nor|2002-12-30|WebDAV MOVE to destination URI which is content-ne|
|15757|Opn|Nor|2003-01-02|Assumption of sizeof (void*)/int begin equal (64-b|
|15857|Opn|Nor|2003-01-07|MUST handle chunked response with a 16385Byte-lo|
|15859|Opn|Nor|2003-01-07|wrong Content-Length header is forwarded when de-c|