httpd-apreq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Estrade Matthieu <estrad...@ifrance.com>
Subject Problem reading post data with mod_proxy enabled
Date Tue, 06 Nov 2001 17:12:16 GMT
Hi

i am actually coding an apache module to control url validity
i want to look the post data.
i am using ap_get_client_block to receive data
i am also using ap_hard_timeout

my apache is configured with mod_proxy...
but when i read POST data, it block the client request, but not unblock 
it, so, my request doesn't continue

could you tell me how to clean this problem..?

this is my read_data() function:

static int
read_data (request_rec * r, const char **rbuf)
{
  int rc;

  if ((rc = ap_setup_client_block (r, REQUEST_CHUNKED_ERROR)) != OK)
    return rc;

  if (ap_should_client_block (r))
    {
      char argsbuffer[HUGE_STRING_LEN];
      int rsize, len_read, rpos = 0;
      long length = r->remaining;
      *rbuf = ap_pcalloc (r->pool, length + 1);

//    ap_hard_timeout ("url_control_module", r);

    while ((len_read =
              ap_get_client_block (r, argsbuffer, sizeof (argsbuffer))) > 0)
      {
//        ap_reset_timeout (r);

          if ((rpos + len_read) > length)
            rsize = length - rpos;
      else
            rsize = len_read;

       memcpy ((char *) *rbuf + rpos, argsbuffer, rsize);
          rpos += rsize;

        }

//    ap_kill_timeout (r);

    }
  return rc;

}

regards

Estrade Matthieu


 
______________________________________________________________________________
ifrance.com, l'email gratuit le plus complet de l'Internet !
vos emails depuis un navigateur, en POP3, sur Minitel, sur le WAP...
http://www.ifrance.com/_reloc/email.emailif



Mime
View raw message