httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jim Jagielski <...@jaguNET.com>
Subject Fix found for A/UX and POST error
Date Tue, 08 Aug 1995 18:15:55 GMT
Working together, Eric and I have discovered the problem with A/UX and
both POST as well as the tricky nastiness required for A/UX in http_main.c
(i.e. the rewind(), etc...).

For some reason, unknown at this time, A/UX is only happy if the 2 fdopen()
calls for conn_in/conn_out refer to different file-descriptors. The obvious
solution is to use dup() to duplicate 'csd' and use that. The below puts
an A/UX wrapper around code that does that, but MAYBE it may be "better"
to have Apache use this "technique" for every system.

Comments?

PS: The below is based on 0.8.8 with my FLOCK patches... your fuzziness will
    vary.
---------->8 cut here--------
***************
*** 645,650 ****
--- 667,673 ----
   */
  
  static int csd;
+ static int dupped_csd;
  static int requests_this_child;
  static int child_num;
  
***************
*** 665,670 ****
--- 688,694 ----
  #endif
  
      csd = -1;
+     dupped_csd = -1;
      child_num = child_num_arg;
      requests_this_child = 0;
      update_child_status (child_num, SERVER_READY);
***************
*** 720,733 ****
  	accept_mutex_off(); /* unlock after "accept" */
  	
  	note_cleanups_for_fd (ptrans, csd);
! 	update_child_status (child_num, SERVER_BUSY);
  #ifdef AUX
! 	conn_in = conn_out = fdopen(csd, "r+");
! #else		
! 	conn_in = fdopen (csd, "r");
! 	conn_out = fdopen (csd, "w");
  #endif
! 	
  	current_conn = new_connection (ptrans, server_conf, conn_in, conn_out);
  
  	if (current_conn->server->do_rfc931)
--- 744,761 ----
  	accept_mutex_off(); /* unlock after "accept" */
  	
  	note_cleanups_for_fd (ptrans, csd);
! 	dupped_csd = csd;
  #ifdef AUX
! 	if ((dupped_csd = dup(csd)) < 0) {
! 	    log_error("couldn't duplicate csd", server_conf);
! 	    dupped_csd = csd;	/* Oh well... */
! 	} else
! 	    note_cleanups_for_fd (ptrans, dupped_csd);
  #endif
! 	update_child_status (child_num, SERVER_BUSY);
! 	conn_in = fdopen (csd, "r");
! 	conn_out = fdopen (dupped_csd, "w");
! 
  	current_conn = new_connection (ptrans, server_conf, conn_in, conn_out);
  
  	if (current_conn->server->do_rfc931)
***************
*** 735,743 ****
  		rfc931((struct sockaddr_in *)&sa_client, &sa_server);
  	
  	r = read_request (current_conn);
- #ifdef AUX
- 	rewind(r->connection->client);
- #endif		
  	if (r) process_request (r); /* else premature EOF --- ignore */
  		
  	if (bytes_in_pool (ptrans) > 80000) {
--- 763,768 ----

-- 
Jim Jagielski  << jim@jaguNET.com >>   | "Stwike him Centuwian, vewy woughwy!"
  **  jaguNET Access Services  **      |                - Pontius Piwate
++       Email: info@jaguNET.com      +++        Voice:  410-931-3157       ++
++       http://www.jaguNET.com/      +++      Data: 931-7060 ("guest")     ++

Mime
View raw message