Login | Register
My pages Projects Community openCollabNet

Discussions > users > Attachments not supported?

maxq
Discussion topic

Hide all messages in topic

All messages in topic

Re: [maxq-users] Attachments not supported?

Author oliverbock
Full name Oliver Bock
Date 2005-09-28 16:00:52 PDT
Message Marcin Cieslak wrote:

>Really? Looks to me that it attempts to simulate multipart request
>with stuffing variables in the URL-encoded form into the "data" attachment.
>
>
This is also my understanding. A year of so ago I fixed MaxQ so it
would work with forms that specify

enctype="multipart/form-data"

However I did not support attachments, only simple form variables. This
is not pointless because you don't always use upload fields on forms
that include them. For example, an e-mail composition form with an
attachment field can be tested without attachments, which is better than
not being able to test it at all.


   Oliver

Re: [maxq-users] Attachments not supported?

Author saperski
Full name Marcin Cieslak
Date 2005-09-28 04:22:47 PDT
Message 2005/9/26, Frank Cohen <fcohen at pushtotest dot com>:
> MaxQ supports multi-part form submits. Posting the snippet of
> recorded script may help me find the problem. -Frank

Really? Looks to me that it attempts to simulate multipart request
with stuffing variables in the URL-encoded form into the "data" attachment.

I found this in com/bitmechanic/maxq​/HttpTestCase.java:

    public void postMultiPart(String url, String data, int contLen,
Object[] args) throws IOException {
        cleanupMethod();
        url = replaceURL(url);

        MultipartPostMethod multipartPost = new MultipartPostMethod(url);
        multipartPost.addPart(new StringPart("data", data));
        if(args != null) {
            multipartPost.setQue​ryString(paramsToNV(​args));
        }

        method = multipartPost;
        method.setFollowRedi​rects(followRedirect​s);
        client.executeMethod(method);
    }

So normal variables sent via form MAY work (if their values are not
too large for example),
but attachements definitely won't.

I did a small testcase, form in attached test.html file.

Attempt to record submit to this form in compact script with maxq pops
up empty message window and raises exception:

java.lang.AssertionError
        at com.bitmechanic.maxq​.generator.AbstractC​odeGenerator.setMult​iPartData(AbstractCo​deGenerator.java:422​)
        at com.bitmechanic.maxq​.generator.AbstractC​odeGenerator.process​Request(AbstractCode​Generator.java:341)
        at com.bitmechanic.maxq​.ProxyServer.process​Request(ProxyServer.​java:113)
        at com.bitmechanic.maxq​.RequestHandler.run(​RequestHandler.java:​211)
        at java.lang.Thread.run​(Thread.java:534)

Normal POST without proxy ends up with (there are extra newlines due
to copy-paste)

POST /video/submit.html HTTP/1.0

User-Agent: w3m/0.5.1

Accept: text/*, image/*

Accept-Encoding: gzip, compress, bzip, bzip2, deflate

Accept-Language: en;q=1.0

Host: localhost

Referer: http://localhost/vid​eo/test.html

Content-type: multipart/form-data;
boundary=-----------​-------------------8​19713528666413529867​20

Content-length: 415



--------------------​------------81971352​866641352986720

Content-Disposition: form-data; name="file1"; filename="motd"

Content-Type: application/octet-stream



FreeBSD 5.4-PRERELEASE (VAIO) #0: Mon Mar 14 18:50:08 CET 2005

Welcome to FreeBSD!



--------------------​------------81971352​866641352986720

Content-Disposition: form-data; name="txt"



OK

--------------------​------------81971352​866641352986720--

And what maxq receives via proxy is:

POST http://localhost/vid​eo/submit.html HTTP/1.1

Host: localhost

User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.8)
Gecko/20050530 Firefox/1.0.4

Accept: text/xml,application​/xml,application/xht​ml+xml,text/html;q=0​.9,text/plain;q=0.8,​image/png,*/*;q=0.5

Accept-Language: pl,en-us;q=0.8,en;q=​0.7,de-de;q=0.5,de;q​=0.3,ru;q=0.2

Accept-Encoding: gzip,deflate

Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7

Keep-Alive: 300

Proxy-Connection: keep-alive

Referer: http://localhost/vid​eo/test.html

Content-Type: multipart/form-data;
boundary=-----------​----------------1144​10893047021127210102​7544

Content-Length: 421



--------------------​---------11441089304​70211272101027544

Content-Disposition: form-data; name="file1"; filename="motd"

Content-Type: application/octet-stream



FreeBSD 5.4-PRERELEASE (VAIO) #0: Mon Mar 14 18:50:08 CET 2005

Welcome to FreeBSD!



--------------------​---------11441089304​70211272101027544

Content-Disposition: form-data; name="txt"



OK

--------------------​---------11441089304​70211272101027544--


Actually I got some real-life form to work and the result was that all
form variables
were stuffed in the urlencoded form...

--Marcin
Attachments

Re: [maxq-users] Attachments not supported?

Author fcohen
Full name Frank Cohen
Date 2005-09-28 02:21:41 PDT
Message Thank Rahul. I'll will take a look tomorrow and let you know if I
find anything. -Frank


On Sep 27, 2005, at 11:31 PM, Rahul Dev wrote:

> Dear Frank,
>
> Thanks for your response.
>
> Nothing seems to get recorded when I make a file /
> image upload. A Dialog box appears with no message in
> it. I would presume, this box is popped out from a
> Exception catch block.
>
> To simulate a simple test, you could try to upload a
> simple attachment in yahoo email via the maxq proxy.
>
> Thanks again,
> Rahul
>
> --- Frank Cohen <fcohen at pushtotest dot com> wrote:
>
>
>> MaxQ supports multi-part form submits. Posting the
>> snippet of
>> recorded script may help me find the problem. -Frank
>>
>>
>>
>>
>>
>> On Sep 24, 2005, at 8:43 PM, Rahul Dev wrote:
>>
>>
>>> Hi,
>>>
>>> Firstly thanks for the wonderful simple product
>>>
>> you
>>
>>> guys have developed. It helped me the most as
>>>
>> compared
>>
>>> to many as you help me tweak with the generated
>>>
>> code.
>>
>>>
>>> One problem: It does not seem to support
>>>
>> attachments.
>>
>>> It seems to throw an exception when I send a
>>> attachment such as document / image.
>>>
>>> Is this a known BUG. If yes, any idea when a
>>>
>> possible
>>
>>> fix / enhancement will come?
>>>
>>> Thanks
>>> Rahul
>>>
>>>
>>>
>>> ____________________​______________
>>> Yahoo! Mail - PC Magazine Editors' Choice 2005
>>> http://mail.yahoo.com
>>>
>>>
>>>
>>
>>
> --------------------​--------------------​--------------------​---------
>
>>> To unsubscribe, e-mail:
>>>
>> users-unsubscribe@ma​xq.tigris.org
>>
>>> For additional commands, e-mail:
>>>
>> users-help at maxq dot tigris dot org
>>
>>>
>>>
>>>
>>>
>>
>>
>>
>>
> --------------------​--------------------​--------------------​---------
>
>> To unsubscribe, e-mail:
>> users-unsubscribe@ma​xq.tigris.org
>> For additional commands, e-mail:
>> users-help at maxq dot tigris dot org
>>
>>
>>
>
>
>
>
> ____________________​______________
> Yahoo! Mail - PC Magazine Editors' Choice 2005
> http://mail.yahoo.com
>
> --------------------​--------------------​--------------------​---------
> To unsubscribe, e-mail: users-unsubscribe@ma​xq.tigris.org
> For additional commands, e-mail: users-help at maxq dot tigris dot org
>
>
>

Re: [maxq-users] Attachments not supported?

Author Rahul Dev <rahuldevblore at yahoo dot com>
Full name Rahul Dev <rahuldevblore at yahoo dot com>
Date 2005-09-27 14:31:55 PDT
Message Dear Frank,

Thanks for your response.

Nothing seems to get recorded when I make a file /
image upload. A Dialog box appears with no message in
it. I would presume, this box is popped out from a
Exception catch block.

To simulate a simple test, you could try to upload a
simple attachment in yahoo email via the maxq proxy.

Thanks again,
Rahul

--- Frank Cohen <fcohen at pushtotest dot com> wrote:

> MaxQ supports multi-part form submits. Posting the
> snippet of
> recorded script may help me find the problem. -Frank
>
>
>
>
>
> On Sep 24, 2005, at 8:43 PM, Rahul Dev wrote:
>
> > Hi,
> >
> > Firstly thanks for the wonderful simple product
> you
> > guys have developed. It helped me the most as
> compared
> > to many as you help me tweak with the generated
> code.
> >
> > One problem: It does not seem to support
> attachments.
> > It seems to throw an exception when I send a
> > attachment such as document / image.
> >
> > Is this a known BUG. If yes, any idea when a
> possible
> > fix / enhancement will come?
> >
> > Thanks
> > Rahul
> >
> >
> >
> > ____________________​______________
> > Yahoo! Mail - PC Magazine Editors' Choice 2005
> > http://mail.yahoo.com
> >
> >
>
--------------------​--------------------​--------------------​---------
> > To unsubscribe, e-mail:
> users-unsubscribe@ma​xq.tigris.org
> > For additional commands, e-mail:
> users-help at maxq dot tigris dot org
> >
> >
> >
>
>
>
--------------------​--------------------​--------------------​---------
> To unsubscribe, e-mail:
> users-unsubscribe@ma​xq.tigris.org
> For additional commands, e-mail:
> users-help at maxq dot tigris dot org
>
>



        
____________________​______________
Yahoo! Mail - PC Magazine Editors' Choice 2005
http://mail.yahoo.com

Re: [maxq-users] Attachments not supported?

Author fcohen
Full name Frank Cohen
Date 2005-09-25 15:36:29 PDT
Message MaxQ supports multi-part form submits. Posting the snippet of
recorded script may help me find the problem. -Frank





On Sep 24, 2005, at 8:43 PM, Rahul Dev wrote:

> Hi,
>
> Firstly thanks for the wonderful simple product you
> guys have developed. It helped me the most as compared
> to many as you help me tweak with the generated code.
>
> One problem: It does not seem to support attachments.
> It seems to throw an exception when I send a
> attachment such as document / image.
>
> Is this a known BUG. If yes, any idea when a possible
> fix / enhancement will come?
>
> Thanks
> Rahul
>
>
>
> ____________________​______________
> Yahoo! Mail - PC Magazine Editors' Choice 2005
> http://mail.yahoo.com
>
> --------------------​--------------------​--------------------​---------
> To unsubscribe, e-mail: users-unsubscribe@ma​xq.tigris.org
> For additional commands, e-mail: users-help at maxq dot tigris dot org
>
>
>

Attachments not supported?

Author Rahul Dev <rahuldevblore at yahoo dot com>
Full name Rahul Dev <rahuldevblore at yahoo dot com>
Date 2005-09-24 11:43:13 PDT
Message Hi,

Firstly thanks for the wonderful simple product you
guys have developed. It helped me the most as compared
to many as you help me tweak with the generated code.

One problem: It does not seem to support attachments.
It seems to throw an exception when I send a
attachment such as document / image.

Is this a known BUG. If yes, any idea when a possible
fix / enhancement will come?

Thanks
Rahul


        
____________________​______________
Yahoo! Mail - PC Magazine Editors' Choice 2005
http://mail.yahoo.com
Messages per page: