httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hagb...@mail.med.cornell.edu (Eric Hagberg)
Subject dupping csd
Date Tue, 08 Aug 1995 18:22:59 GMT
Forwarded for Jim Jagielski (This fixes my previous patch which got A/UX to
respond to GET requests, but not POSTs, and also might help out other
platforms, so some of the patches aren't #ifdef'ed AUX.)...

-ech
--------------------------------

Eric,

Here is, what I feel, is a Good Patch. It adds just a "minor" adjustment
for A/UX but also uses dupped_csd for others.

Do you want to post this to new-httpd and see what happens? Maybe people
may want to remove the A/UX specificness of it and see what happens :)

***************
*** 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 ----
--
#include <std/disclaimer.h>
  |     Jim Jagielski      |  jim@jagubox.gsfc.nasa.gov  |  V: 301 286-5964  |
  | NASA/GSFC, Code 734.4  |     Greenbelt, MD 20771     |  F: 301 286-1719  |
     << This sig is a figment of your imagination; SEEK MENTAL HELP !! >>

______________________________________________________
Eric Hagberg                       Phone: 212-746-6387
User Services Manager, CUMC/OAC    Fax:   212-746-8161



Mime
View raw message