Hi David,
Am Samstag, 13. August 2005 00:46 schrieb David N. Welton:
> Arnulf Wiedemann wrote:
> > Hi David,
> >
> >>It might take a few days, depending on how much time I have, but it
> >>seems that it's something that will be useful for others.  If you have
> >>some C skills, it probably wouldn't be that hard to get started looking
> >>at it... to be correct you'd want to modify apache_request.c to save the
> >>data and then create a Tcl command to access it.
> >
> > in the last Mail I had the diff running on the wrong version (there were
> > 2 missing lines)
>
> I've been looking at this some and created a patch of my own that's
> checked into CVS... please check out and compile from there and see what
> you think.  The Tcl command is raw_post.  The C code tries to be clever
> in that it uses the existing infrastructure:
>
> int ApacheRequest_parse_urlencoded(ApacheRequest *req)
> {
>     request_rec *r = req->r;
>     int rc = OK;
>
>     if (r->method_number == M_POST) {
>       const char *data = NULL, *type;
>
>       type = ap_table_get(r->headers_in, "Content-Type");
>
>       if (!strncaseEQ(type, DEFAULT_ENCTYPE, DEFAULT_ENCTYPE_LENGTH)) {
>           return DECLINED;
>       }
>       if ((rc = util_read(req, &data)) != OK) {
>           return rc;
>       }
>       if (data) {
>           req->raw_post = data; /* Give people a way of getting at the raw
> data. */
>           split_to_parms(req, data);
>       }
>     }
>
>     return OK;
> }
>
> and just saves a pointer to the data which Tcl can fish out later.
>

As I do not know the internals, I had a "quick and dirty" solution. I agree 
your solution fits better. 

The problem is still, that mime-type text/xml is not allowed at all.
Here is my fix for that:

>diff apache_request.h apache_request.h.new
83a84,86
> #define TEXT_XML_ENCTYPE "text/xml"
> #define TEXT_XML_ENCTYPE_LENGTH 8
>

>diff apache_request.c apache_request.c.new
375a376,378
>       else if (ct && strncaseEQ(ct, TEXT_XML_ENCTYPE, 
TEXT_XML_ENCTYPE_LENGTH)) {
>          result = ApacheRequest_parse_urlencoded(req);
>       }
405c408,410
<           return DECLINED;
---
>           if (!strncaseEQ(type, TEXT_XML_ENCTYPE, TEXT_XML_ENCTYPE_LENGTH)) 
{
>               return DECLINED;
>           }

using that it works with the Tcl raw_post command.
Thanks for your help.

> In any case, let me know if that does the trick or not.
>
> Ciao,

using the following line for configuring:

./configure.tcl -prefix /usr/local/APACHE 
-with-apxs /usr/local/APACHE/bin/apxs -with-tclconfig 
$HOME/ActiveTcl/lib/tclConfig.sh

I get the following messages:

Configuring
.error: can't read "AR": no such variable
  line was: TCL_STLIB_LD='${AR} cr'
  emitting empty variable for: TCL_STLIB_LD
  please make it right in configs.tcl or figure out the bug

error: can't read "LIBS": no such variable
  line was: TCL_SHLIB_LD_LIBS='${LIBS}'
  emitting empty variable for: TCL_SHLIB_LD_LIBS
  please make it right in configs.tcl or figure out the bug

error: can't read "LIB_RUNTIME_DIR": no such variable
  line was: TCL_CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
  emitting empty variable for: TCL_CC_SEARCH_FLAGS
  please make it right in configs.tcl or figure out the bug

error: can't read "LIB_RUNTIME_DIR": no such variable
  line was: TCL_LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
  emitting empty variable for: TCL_LD_SEARCH_FLAGS
  please make it right in configs.tcl or figure out the bug

error: can't read "VERSION": no such variable
  line was: TCL_SHARED_LIB_SUFFIX='${VERSION}${DBGX}.so'
  emitting empty variable for: TCL_SHARED_LIB_SUFFIX
  please make it right in configs.tcl or figure out the bug

error: can't read "VERSION": no such variable
  line was: TCL_UNSHARED_LIB_SUFFIX='${VERSION}${DBGX}.a'
  emitting empty variable for: TCL_UNSHARED_LIB_SUFFIX
  please make it right in configs.tcl or figure out the bug

.........done.

Nevertheless calling make.tcl afterwards builds without problems

Can you give me a hint, what I am doing wrong?

Arnulf

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to