Re: [RELEASE CANDIDATE] libapreq2 2.09-RC2

2007-08-08 Thread Jonathan Vanasco



Are we going to have 2.09 release? It's been quite some time since  
RC2
actually, i'd like to see an RC3-- there was an issue I kept  
complaining about  that Joe was going to solve thanks to some testing  
by [EMAIL PROTECTED] -- reference the posting on 2007.05.25


Supposedly, this is going to lighten up after August when my  
startup goes lives (Aug 10).

congrats!

what are you doing there, if you don't mind me asking... i noticed  
that they were hiring ruby people a while back.  i feared we lost you.





Re: Test fail on AIX 5.3

2007-05-03 Thread Jonathan Vanasco


On May 3, 2007, at 12:57 AM, [EMAIL PROTECTED] wrote:
util...FAILED tests  
36-37  Failed  
2/89 tests, 97.75% okay

Failed Test Stat Wstat Total Fail  Failed  List of Failed


interesting -- thats where OSX fails too.

Joe wrote some suggestions about 1-2 weeks ago to try and get my os  
to compile that correctly -- it didn't work for me, but it might work  
for you.


Re: Error Building libapreq2.08

2007-04-15 Thread Jonathan Vanasco


On Apr 15, 2007, at 9:22 AM, Joe Schaefer wrote:


Jonathan Vanasco [EMAIL PROTECTED] writes:


I encountered an error building libapreq2.08

I posted it on the mp list when I thought it was perl related, but  
the issue

seems to be in the C code , so i'm reposting here.

I'm running osx 10.4.9


What optimization flags are you using?  You may need -O0 on osx.


Makefile had:

CFLAGS = -g -O2 -fno-strict-aliasing
CXXFLAGS = -g -O2

I tried it as -O0, no luck

Any other  suggestions?




// Jonathan Vanasco

| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - - - - - - - - - - - -

| SyndiClick.com
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - - - - - - - - - - - -

|  FindMeOn.com - The cure for Multiple Web Personality Disorder
|  Web Identity Management and 3D Social Networking
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - - - - - - - - - - - -

|  RoadSound.com - Tools For Bands, Stuff For Fans
|  Collaborative Online Management And Syndication Tools
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - - - - - - - - - - - -





Error Building libapreq2.08

2007-04-13 Thread Jonathan Vanasco

I encountered an error building libapreq2.08

I posted it on the mp list when I thought it was perl related, but  
the issue seems to be in the C code , so i'm reposting here.


I'm running osx 10.4.9


Error

perl -MTest::Harness -e 'runtests(@ARGV)' version.t cookie.t params.t  
parsers.t error.t util.t

versionok
cookie.ok
params.ok
parsersok
3/542 skipped: skipping ELF-dependent tests (parsers.c:134)
error..ok
util...FAILED tests 36-37
Failed 2/89 tests, 97.75% okay
Failed Test Stat Wstat Total Fail  Failed  List of Failed
 
---

util.t892   2.25%  36-37
3 subtests skipped.
Failed 1/6 test scripts, 83.33% okay. 2/747 subtests failed, 99.73%  
okay.

make[2]: *** [test] Error 255
make[1]: *** [test] Error 2
make: *** [library_test] Error 2



Verbose error (  $export HARNESS_VERBOSE='1' )

not ok 36 - apreq_decode(expect, elen, src3, sizeof(src3) -1) ==  
APR_SUCCESS, as integers # at (util.c:107) test 5 in test_charset_divine
not ok 37 - apreq_charset_divine(expect, elen) ==  
APREQ_CHARSET_CP1252, as integers # at (util.c:109) test 6 in  
test_charset_divine



in util.c:

static void test_charset_divine(dAT)
{
apr_size_t elen;
char src1[] = %C3%80%E3%82%a2; /* A_GRAVE KATAKANA_A as utf8 */
char src2[] = pound%A3;/* latin-1 */
char src3[] = euro%80;/* cp-1252 */
char expect[6];

AT_int_eq(apreq_decode(expect, elen, src1, sizeof(src1) -1),
  APR_SUCCESS);

AT_int_eq(apreq_charset_divine(expect, elen), APREQ_CHARSET_UTF8);

AT_int_eq(apreq_decode(expect, elen, src2, sizeof(src2) -1),
  APR_SUCCESS);

AT_int_eq(apreq_charset_divine(expect, elen),  
APREQ_CHARSET_LATIN1);

AT_int_eq(apreq_decode(expect, elen, src3, sizeof(src3) -1),
  APR_SUCCESS);

AT_int_eq(apreq_charset_divine(expect, elen),  
APREQ_CHARSET_CP1252);


}





// Jonathan Vanasco

| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - - - - - - - - - - - -

| SyndiClick.com
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - - - - - - - - - - - -

|  FindMeOn.com - The cure for Multiple Web Personality Disorder
|  Web Identity Management and 3D Social Networking
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - - - - - - - - - - - -

|  RoadSound.com - Tools For Bands, Stuff For Fans
|  Collaborative Online Management And Syndication Tools
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - - - - - - - - - - - -





issue when browser sends server-side image map info

2007-02-21 Thread Jonathan Vanasco


1) Yes, I know server-side image maps are 1996.  But they're still  
part of the HTML spec , and not deprecated



http://www.w3.org/TR/html401/struct/objects.html#h-13.6.2

	The location clicked is passed to the server as follows. The user  
agent derives a new URI from the URI specified by the href attribute  
of the A element, by appending `?' followed by the x and y  
coordinates, separated by a comma. The link is then followed using  
the new URI. For instance, in the given example, if the user clicks  
at the location x=10, y=27 then the derived URI is http:// 
www.acme.com/cgi-bin/competition?10,27.
	User agents that do not offer the user a means to select specific  
coordinates (e.g., non-graphical user agents that rely on keyboard  
input, speech-based user agents, etc.) should send the coordinates  
0,0 to the server when the link is activated.



2) The issue:

lets say we have this url :

http://www.acme.com/cgi-bin/competition

it gets rewritten as:

http://www.acme.com/cgi-bin/competition?10,27

but, if we have this url:

http://www.acme.com/cgi-bin/competition?token=a

it gets rewritten as:

http://www.acme.com/cgi-bin/competition?token=a?10,27

which then kills the parser --

print $apr-param('token')
a?10,27

i think the spirit of the spec was to have
http://www.acme.com/cgi-bin/competition?10,27token=a
but the language and implementations give
http://www.acme.com/cgi-bin/competition?token=a?10,27

which will break just about every param knon to man.

	i know this isn't a 'bug' -- its because the HTTP rfc and HTML spec  
have this glaring discrepancy.


that said, i think it would be nice if libapreq would remove
\?(\d*),(\d*)$

from uris before parsing...

	and perhaps make that info available by another function ? (i strip  
it out with regex off an unparsed URI already , so that would just be  
icing on the cake )




// Jonathan Vanasco

| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - - - - - - - - - - - -

| SyndiClick.com
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - - - - - - - - - - - -

|  FindMeOn.com - The cure for Multiple Web Personality Disorder
|  Web Identity Management and 3D Social Networking
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - - - - - - - - - - - -

|  RoadSound.com - Tools For Bands, Stuff For Fans
|  Collaborative Online Management And Syndication Tools
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - - - - - - - - - - - -





perl glue - is there a way of accessing a param without unescaping the value?

2007-01-07 Thread Jonathan Vanasco


simply put.  is there a way of accessing a param ?

?encoded=type%3Durl

$apr-param('encoded') = 'type=url'

i need to access the raw value of encoded


// Jonathan Vanasco

| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - - - - - - - - -

| FindMeOn.com - The cure for Multiple Web Personality Disorder
| Web Identity Management and 3D Social Networking
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - - - - - - - - -

| RoadSound.com - Tools For Bands, Stuff For Fans
| Collaborative Online Management And Syndication Tools
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - - - - - - - - -




Re: perl glue - is there a way of accessing a param without unescaping the value?

2007-01-07 Thread Jonathan Vanasco


On Jan 7, 2007, at 10:43 PM, Jonathan Vanasco wrote:



simply put.  is there a way of accessing a param ?

?encoded=type%3Durl

$apr-param('encoded') = 'type=url'

i need to access the raw value of encoded


just to clarify...

this is because using param, it seems that GET and POST responses  
differ in how they parse arguments.  one seems to be uri_unescaped,  
and the other seems not


i'm trying to standardize how i intereact with this.




// Jonathan Vanasco

| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - - - - - - - - -

| FindMeOn.com - The cure for Multiple Web Personality Disorder
| Web Identity Management and 3D Social Networking
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - - - - - - - - -

| RoadSound.com - Tools For Bands, Stuff For Fans
| Collaborative Online Management And Syndication Tools
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - - - - - - - - -





Re: [EMAIL PROTECTED]: New: #40759: Unable to compile libapreq2]

2006-12-11 Thread Jonathan Vanasco


On Dec 11, 2006, at 11:33 AM, Philip M. Gollucci wrote:


Joe Orton wrote:
Forwarded and closed since there is no apreq product in bugzilla,  
let infra know if you want one :)
(this -lipv6api doesn't come from API so I presume it comes form  
apreq?)
[8:32:02](ttypf)[EMAIL PROTECTED]: /home/ 
pgollucci/dev/repos/asf/httpd/apreq/trunk 100 0
grep -R v6api *


[nothing]

I doubt its from apreq.  Its probably part of the linker flags from  
earlier in the AMP stack.


Did you compile everything with gcc ?
perl, httpd, mod_perl etc ?


is there a lipv6api file somewhere on the system , like in /usr/local/ 
lib or something?


i kept running into an issue on freebsd where apreq kept looking in  
the apache2 dir ( /usr/local/lib/apache2 ) instead of /usr/local/lib
everything would fail , because only a handful of apache specific  
libraries were in there


i ended  up solving it by doing some particularly nasty stuff  
regarding gcc, which works - but it messy as all hell


i'd check to see if you have the lipv6api somewhere in /usr/local/lib  
or /usr/opt.i *think* its possible that libapreq is only looking  
in /usr/opt/hpapache2
also check  the line above your error to see what exactly got linked  
correctly.


its just a hunch... but it seems to be exactly like what was driving  
me crazy last weekend.


// Jonathan Vanasco

| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - - - - - - - - -

| FindMeOn.com - The cure for Multiple Web Personality Disorder
| Web Identity Management and 3D Social Networking
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - - - - - - - - -

| RoadSound.com - Tools For Bands, Stuff For Fans
| Collaborative Online Management And Syndication Tools
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - - - - - - - - -





Re: freebsd upgrade problem

2006-11-28 Thread Jonathan Vanasco


On Nov 28, 2006, at 1:58 AM, Philip M. Gollucci wrote:


Seems to be a FreeBSD quark / fluke, I'll try and solve this off-list.


Argh.. I finally got it.

Thanks a ton to Philip for some offlist pointers.

error:
cd /usr/ports/www/libapreq2
make install

	cc -shared  .libs/util.o .libs/version.o .libs/cookie.o .libs/ 
param.o .libs/parser.o .libs/parser_urlencoded.o .libs/ 
parser_header.o .libs/parser_multipart.o .libs/module.o .libs/ 
module_custom.o .libs/module_cgi.o .libs/error.o  -Wl,--rpath -Wl,/ 
usr/local/lib/apache2 -Wl,--rpath -Wl,/usr/local/lib/apache2 /usr/ 
local/lib/apache2/libapr-0.so /usr/local/lib/apache2/libaprutil-0.so - 
ldb-4.2 -lexpat -liconv -lm -lcrypt -L/usr/local  -Wl,-soname - 
Wl,libapreq2.so.8 -o .libs/libapreq2.so.8

/usr/bin/ld: cannot find -ldb-4.2
gmake[2]: *** [libapreq2.la] Error 1

fix:

cd /usr/ports/www/libapreq2
export GCC_EXEC_PREFIX=/usr/local/lib
make install

I think this might actually be indicative of a ports problem/quirk,  
so i'm posting it here:


the apache20 port installs the various libs in /usr/local/lib/apache2
	when libapreq2 builds against that, it sets the base lib to  /usr/ 
local/lib/apache2 (this is the libapreq ports and source)
	i think the apache22 port and the apache source will automatically  
install into /usr/local/lib instead -- and not cause this issue to occur
	if you install the apr lib on its own (not the bundled 0.9 branch in  
apache20 ) you get a 1.0 branch in /usr/local/lib -- i think there's  
a way to build that first and have apache20 link against that, but  
i'm not sure.


i could be wrong - and this is all some sort of box specific issue.   
i'm not all that familiar with gcc and ld.  but this is what the  
problem looks to be from my vantage.


in any event, there you go.  so the next person to have this  
nightmare won't have this issue.


// Jonathan Vanasco

| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - - - - - - - - -

| FindMeOn.com - The cure for Multiple Web Personality Disorder
| Web Identity Management and 3D Social Networking
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - - - - - - - - -

| RoadSound.com - Tools For Bands, Stuff For Fans
| Collaborative Online Management And Syndication Tools
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - - - - - - - - -





Re: Problems with apreq2 on OS X

2006-10-29 Thread Jonathan Vanasco




Fred Moyer wrote:
If you go to PHP, you should not expect a trouble free life :) I  
don't have anything against PHP, but it has it's own set of  
problems.  With development in any language, you need to make sure  
that you keep a tight hold on your versions.  Using the latest  
version of something isn't always the best move, as experience has  
taught me.  It's nice to try it out and report bugs back, and  
helpful to the development of the project, but use the version  
that works for you.


two webapps I use  right now are running different sections under  
mod_perl, php, and python.
by far, the biggest security issues i've had have been with php,  
'versioning' issues with python, and programming with perl.
they'll all cost you the same amount of headache and time-- the  
question is where are the issues going to be?
with most programmers, the php issues fall not on them, but on  
someone who is stuck admining the server.  so don't think you'll be  
saving headaches overall.  you just might be making your problem  
someone elses.


On Oct 29, 2006, at 3:23 PM, Patrick Galbraith wrote:
I know, I'm just frustrated and venting after losing many hours of  
dev time. The reason CGI won't work in my case is I've written all  
this code as a handler and putting into CGI seems like it'd be a  
lot of work.  Maybe not, I'm not sure what I would have to change  
since I rely so much on the request object.


he doesn't mean write it as a CGI, but to use CGI.pm

you can use any perl modules you want under mod_perl

just  use CGI.pm, or formbuilder, or something else to handle parsing  
your get post


in your mp handler, create a new parsing object, instantiate it with  
$r, then stuff it in a pnote.


anytime you need to access form vars, just  get the object out of the  
pnote.


its not as fast as apr, but not significantly so -- and if you're  
hitting a db at all during your request, the speed different is  
completely irrelevant



When you say to use an earlier version of libapreq, do you mean  
version 1.0? That won't work because all the linux dists I deal  
with are ones with pre-packaged mod_perl2 and apache2 (but haven't  
been able to get apreq to compile correctly against those pre- 
package versions, trying everything from source).

try 1.07 / 1.08 both run for me on osx / freebsd / ubuntu



// Jonathan Vanasco

| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - - - - - - - - -

| FindMeOn.com - The cure for Multiple Web Personality Disorder
| Web Identity Management and 3D Social Networking
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - - - - - - - - -

| RoadSound.com - Tools For Bands, Stuff For Fans
| Collaborative Online Management And Syndication Tools
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - - - - - - - - -





Re: $reg-param, $req-body - is there a way to set form data?

2006-10-27 Thread Jonathan Vanasco


On Oct 27, 2006, at 8:25 PM, Philip M. Gollucci wrote:


You can not, they are readonly versions of APR::Table (apr_table_t)

You could always copy the structure to a hash somewhere.  Also,  
check the archvies of this
list, I know someone (probably joes) posted an answer to this  
question before.


Just to add-

I think that approach can lead to some big problems.

I'd strongly suggest having a Form class, or some 'untaint' class,  
loop through the necessary fields -- pulling them from APR::Table,  
and validating/untainting them -- then just deal with those values.


Personally, I have a class that does this:
Loop through values  validate
	valid data gets cleaned ( lead/trailing whitespace stripped, int()  
numerics ), and stored in an cleaned hash

errors get marked in a hash that has an error code keyed to the field

if scalar keys %errors :
reprint form using the valid array as defaults
else:
do biz logic on the valid data




// Jonathan Vanasco

| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - - - - - - - - -

| FindMeOn.com - The cure for Multiple Web Personality Disorder
| Web Identity Management and 3D Social Networking
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - - - - - - - - -

| RoadSound.com - Tools For Bands, Stuff For Fans
| Collaborative Online Management And Syndication Tools
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - - - - - - - - -





docs are still half-missing

2006-07-28 Thread Jonathan Vanasco

just a heads up:

does not exist
http://httpd.apache.org/apreq/docs/libapreq2/examples.html
still no perl

http://httpd.apache.org/apreq/docs/libapreq2/group__apreq__lang.html


perl glue usage style question

2006-05-31 Thread Jonathan Vanasco
this is a style question for using the perl glue, purely stylistic -  
just wondering what the accepted standard is in terms of accessing a  
param within a single cgi script


ie: access the param via $libapreq every time, or pull 1x, then use  
repeatedly


this is a halfassed illustration below showing some exceedingly poor  
design ideas.  just trying to show exxagerated scenarios.



case a:
sub aa {
if ( $request-param('a') eq 'b' ){
do_stuff( $request-param('a') );
}
more_stuff( $request-param('a') );
other_stuff( $request-param('a') );
different_stuff();
}
sub different_stuff{
if ( $request-param('a') eq 'b' ){
}
}

case b:
sub aa {
if ( $a eq 'b' ){
do_stuff( $a );
}
more_stuff( $a );
other_stuff( $a );
different_stuff();
}
sub different_stuff{
		if ( $request-param('a') eq 'b' ){ # or rewrite to accept $a as an  
arg like the others

}
}


Re: 2.07 and Mac OSX

2006-02-15 Thread Jonathan Vanasco

[ This was sent earlier, accidentally, from a non-subscribed address ]

Mac OSX 10.4.5
httpd 2.0.55
mod_perl 2.02
libapreq2.07

Has anyone got this working?

It keeps failing on make test

util...FAILED tests 36-37
Failed 2/89 tests, 97.75% okay

Failed Test Stat Wstat Total Fail  Failed  List of Failed
 
---

util.t892   2.25%  36-37

I can't seem to figure out what tests 36-37 are

my install args are

httpd
	./configure prefix=/usr/local/apache2 --with-mpm=prefork --enable- 
dav --enable-so --enable-maintainer-mode --with-dbm=db4 --with- 
berkeley-db=/usr/local/BerkeleyDB.4.2 --enable-rewrite --enable-deflate



mp2
perl Makefile.PL MP_APXS=/usr/local/apache2/bin/apxs

libapreq
	./configure --with-expat=/usr/local/apr  --with-apache2-apxs=/usr/ 
local/apache2/bin/apxs --enable-perl-glue





corrupt cookie kills mod-perl / apreq

2006-02-14 Thread Jonathan Vanasco

[note: x-posted to modperl]
[note: i sent this earlier from an unsubscribed address.  that  
shouldn't go through.  if it does, apologies in advance ]


I wrote a web services module to incorporate the TrackBack protocol  
into my mod_perl application


I started testing it using WordPress - the php blog software

It seems to have set a cookie (see details below) , that causes an  
automatic error in modperl


The error in the logs is :Expected token not present

It was touched briefly in :
[mp2] Expected token not present error in logs
Date: Sun, 8 Jan 2006 11:18:10 -0500

The extent to which it was discussed was:

Joe Schaefer
	It probably means that the request's Cookie: header was missing an  
= sign.

Philip M. Gollucci
joes: any possibility of improving that error message in 2.07-dev ?

And then the conversation died.

The issue seems to be definitively caused by an issue in the way that  
wordpress encodes the cookie and safari sends it

http://wordpress.org/support/topic/52813
http://www.darcynorman.net/2005/12/21/upgrading-blog-to-wp-20-rc3

From the headers_in , it seems that WordPress includes raw-php code  
(instead of executing it), and either wordpress or safari doesn't  
properly escape the = sign in the cookies.


In production I see little chance this will affect me or any other  
user -- the invalid cookie isn't going to be sent to the box.


BUT it brings up this issue - a corrupt cookie of this sort seems to  
call a die() in modperl  once libapreq attempts to parse it.  i'd say  
50% of the dies are met with a segfault.  i don't know why its not a  
1:1 ratio.


I couldn't seem to find any way to provide a defense against this.   
Just calling cookiejar-cookie() will cause the error.

my $cookiejar   = Apache2::Cookie::Jar-new( $self-{'apr'} );
my @names   = $cookiejar-cookies();

the segfault, natually, occurs whether or not the code is wrapped in  
an eval block.  an eval block didn't seem to catch the other  error  
either (sorry, but i can't discern what it is)


Can someone suggest an approach?  Maybe some sort of validation regex  
needs to be in/updated on the cookie parsing code?  I'm a little  
uneasy with the idea that sending a bad cookie gives a 50% chance to  
segfault a server.


I've enclosed a Data::Dumper representation of the the APR::Table  
headers_in atfer the cookie info.  I'll be happy to pull it into any  
other format if instructed how.


To recreate this, you can use:
wordpress-2.0.1 (current)
mac osx 10.4 + safari 2.0.3
libapreq 2.07
httpd 2.055

===
Created
193189633
Domain
g5.local
Expires
2007-02-14T23:47:13Z
Name
dbx-postmeta
Path
/
Value
grabit=0-,1-,2-,3-,4-,5-,6-amp;advancedstuff=0-,1+,2-
===
$headers_in = bless( {
   'Accept' = '*/*',
   'Accept-Language' = 'en',
   'Accept-Encoding' = 'gzip, deflate',
   'Cookie' =  
'wordpressuser_c580712eb86cad2660b3601ac04202b2=admin;  
wordpresspass_c580712eb86cad2660b3601ac04202b2=7ebeeed42ef50720940f5b8db 
2f9db49; rs_session=59ae9b8b503e3af7d17b97e7f77f7ea5; dbx- 
postmeta=grabit=0-,1-,2-,3-,4-,5-,6-advancedstuff=0-,1+,2-',
   'User-Agent' = 'Mozilla/5.0 (Macintosh; U;  
PPC Mac OS X; en) AppleWebKit/417.9 (KHTML, like Gecko) Safari/417.8',

   'Connection' = 'keep-alive',
   'Host' = 'g5.local:8082'
 }, 'APR::Table' );



Re: POST_MAX

2006-02-13 Thread Jonathan Vanasco


Anyone?  This is killing me.

The only thing I've been able to figure out is this:

my  $error = $apacheRequest-body_status();
if ( $error eq 'Exceeds configured maximum limit' )
{
$self-RESULT_FINAL__general( undef , 'Your file is too big.' );
return;
}


matching against a error text message is pretty bad, IMO, and makes  
me worry what happens if someone changes the error message or if  
there are multiple errors.





On Feb 10, 2006, at 10:50 AM, Jonathan wrote:


how do i catch the error when POST_MAX has been passed?

ie-

sub handler
{
my  $r   = shift;
	my 	$apr = Apache2::Request-new( $r , DISABLE_UPLOADS=0 ,  
POST_MAX=100_000 );

}

and someone tries to upload something 200_000 ?

it's unclear in the docs
	http://httpd.apache.org/apreq/docs/libapreq2/ 
group__apreq__xs__request.html


---
* POST_MAX, MAX_BODY
Limit the size of POST data (in bytes).
---

i'd love to know how to catch this, and even more for someone to  
update the docs with that info :)






Re: More on httpd2.2, libapreq2, apr and mod_perl2 not playing nice

2006-02-01 Thread Jonathan Vanasco


On Jan 29, 2006, at 6:05 PM, ben syverson wrote:


sigh

Any ideas?


Considering that MP2/libapreq2 - AFAIK - are designed for httpd2.0 --  
does this compile on your system?

httpd2.0, libapreq2, apr and mod_perl2



Namespace confusion

2005-05-27 Thread jonathan vanasco


Installed:

Apache2::Request
Apache2::Cookie
Apache2::Upload

APR::Request
APR::Request::Cookie

In a recent posting:
...the APR::* classes will be the
ones we recommend nowadays.  We debated whether to chuck the Apache2::*
classes entirely, but we left them in for back-compat reasons.

Now:
I'm at a loss

	Should I be using the APR::Request / APR::Request::Cookie methods 
instead of Apache2 ?

If so, why no APR::Request::Upload?



Re: Problem with -path in Apache2::Cookie?

2005-05-27 Thread jonathan vanasco


Just to add onto the issue below:
my $cookie = Apache2::Cookie-new($r, -path = $mypath...)

I experienced something similar -- domain and path both were set to 
what i specified for path


I tried a workaround for domain, and ended up having the path set to 
the expiration argument ('+365'), while expiration was set to the 
expiration date ('Sun, 28-May-2006 04:54:37 GMT')


specifiying the domain and path, re: the workaround, fixes it all up

Mac OSX 10.3.9
libapreq whatever is current.tgz on May 28
apache 2.0.5.4
modperl whatever is current.bz2 on May 28
perl 5.8.1 (stock osx)





On May 13, 2005, at 1:05 AM, Joe Schaefer wrote:


Fred Moyer [EMAIL PROTECTED] writes:


[cc'ing the apreq-dev@httpd.apache.org list]

Pete Houston wrote:

Yes, I found exactly the same behaviour yesterday, and it did affect
Firefox too. I used the same workaround which seems to work in all 
the

scenarios I tested.


So it sounds like this is an issue with dev_2.05.  I'll dig into it 
if I
get a chance, but this is probably a no-brainer for someone 
experienced

with the codebase.


Problem ack'd; I've no clue why this happens tho.  Must be some
XS-related bug.  I'll add a new test to trunk which tickles it,
so others can whittle away as well.

--
Joe Schaefer