Request size in browse revisions

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Request size in browse revisions

Eliot Miranda-2
Hi Chris,

    I just looked for revisions of a large initialization method in VMMaker.oscog and got the reply

'HTTP/1.1 414 Request-URI Too Large
server: nginx/1.12.2
date: Fri, 12 Jan 2018 17:26:03 GMT
content-type: text/html
content-length: 193
connection: close

<html>
<head><title>414 Request-URI Too Large</title></head>
<body bgcolor="white">
<center><h1>414 Request-URI Too Large</h1></center>
<hr><center>nginx/1.12.2</center>
</body>
</html>
'

I wonder could the API be changed so that the request doesn't include the body of the method, but only its selector, class and timestamp?  The issue would appear to be here:

httpGet: actionString for: aMCDefinition
^ HTTPSocket
httpGet: self locationWithTrailingSlash
args: 
{ 'action'->{actionString}.
'mc-definition'-> {self serializeForRequest: aMCDefinition}}
user: self user
passwd: self password

Copying the aMCDefinition instance and setting its source to something small (nil?, the empty string?, the selector?) would solve the size problem.  What info does the server require?

_,,,^..^,,,_
best, Eliot


Reply | Threaded
Open this post in threaded view
|

Re: Request size in browse revisions

Tobias Pape

> On 12.01.2018, at 18:30, Eliot Miranda <[hidden email]> wrote:
>
> Hi Chris,
>
>     I just looked for revisions of a large initialization method in VMMaker.oscog and got the reply
>
> 'HTTP/1.1 414 Request-URI Too Large
> server: nginx/1.12.2
> date: Fri, 12 Jan 2018 17:26:03 GMT
> content-type: text/html
> content-length: 193
> connection: close
>
> <html>
> <head><title>414 Request-URI Too Large</title></head>
> <body bgcolor="white">
> <center><h1>414 Request-URI Too Large</h1></center>
> <hr><center>nginx/1.12.2</center>
> </body>
> </html>
> '
>
> I wonder could the API be changed so that the request doesn't include the body of the method, but only its selector, class and timestamp?  The issue would appear to be here:
>
> httpGet: actionString for: aMCDefinition
> ^ HTTPSocket
> httpGet: self locationWithTrailingSlash
> args:
> { 'action'->{actionString}.
> 'mc-definition'-> {self serializeForRequest: aMCDefinition}}
> user: self user
> passwd: self password
>
> Copying the aMCDefinition instance and setting its source to something small (nil?, the empty string?, the selector?) would solve the size problem.  What info does the server require?


The problem here is _not_ the body of the method, but rather the requested URL.

Can you give us the value of 'self locationWithTrailingSlash' for that method?

-=-=-
Never mind, the problem is that this is a GET request that serializes the WHOLE definition into the URL.

It would be better to make that a POST and encode 'action' and 'mc-defintion' in the POST's body


Best regards
        -Tobias


Reply | Threaded
Open this post in threaded view
|

Re: Request size in browse revisions

Eliot Miranda-2


On Fri, Jan 12, 2018 at 11:37 AM, Tobias Pape <[hidden email]> wrote:

> On 12.01.2018, at 18:30, Eliot Miranda <[hidden email]> wrote:
>
> Hi Chris,
>
>     I just looked for revisions of a large initialization method in VMMaker.oscog and got the reply
>
> 'HTTP/1.1 414 Request-URI Too Large
> server: nginx/1.12.2
> date: Fri, 12 Jan 2018 17:26:03 GMT
> content-type: text/html
> content-length: 193
> connection: close
>
> <html>
> <head><title>414 Request-URI Too Large</title></head>
> <body bgcolor="white">
> <center><h1>414 Request-URI Too Large</h1></center>
> <hr><center>nginx/1.12.2</center>
> </body>
> </html>
> '
>
> I wonder could the API be changed so that the request doesn't include the body of the method, but only its selector, class and timestamp?  The issue would appear to be here:
>
> httpGet: actionString for: aMCDefinition
>       ^ HTTPSocket
>               httpGet: self locationWithTrailingSlash
>               args:
>                       { 'action'->{actionString}.
>                       'mc-definition'-> {self serializeForRequest: aMCDefinition}}
>               user: self user
>               passwd: self password
>
> Copying the aMCDefinition instance and setting its source to something small (nil?, the empty string?, the selector?) would solve the size problem.  What info does the server require?


The problem here is _not_ the body of the method, but rather the requested URL.

Can you give us the value of 'self locationWithTrailingSlash' for that method?

-=-=-
Never mind, the problem is that this is a GET request that serializes the WHOLE definition into the URL.

It would be better to make that a POST and encode 'action' and 'mc-defintion' in the POST's body

+1
 


Best regards
        -Tobias





--
_,,,^..^,,,_
best, Eliot


Reply | Threaded
Open this post in threaded view
|

Re: Request size in browse revisions

Chris Muller-3
Hi guys,

You're right, it should be a PUT.  The logic in
SSSession>>#getRequest: should be moved to SSSession>>#putRequest:.
That would probably fix Eliot's issue.

For revisions, only the MCDefinitions #description is used, but for
origin requests, the whole object is needed.  The code is a lot
cleaner by always passing the Definition and simply checking the
action.

 - Chris

On Fri, Jan 12, 2018 at 3:47 PM, Eliot Miranda <[hidden email]> wrote:

>
>
> On Fri, Jan 12, 2018 at 11:37 AM, Tobias Pape <[hidden email]> wrote:
>>
>>
>> > On 12.01.2018, at 18:30, Eliot Miranda <[hidden email]> wrote:
>> >
>> > Hi Chris,
>> >
>> >     I just looked for revisions of a large initialization method in
>> > VMMaker.oscog and got the reply
>> >
>> > 'HTTP/1.1 414 Request-URI Too Large
>> > server: nginx/1.12.2
>> > date: Fri, 12 Jan 2018 17:26:03 GMT
>> > content-type: text/html
>> > content-length: 193
>> > connection: close
>> >
>> > <html>
>> > <head><title>414 Request-URI Too Large</title></head>
>> > <body bgcolor="white">
>> > <center><h1>414 Request-URI Too Large</h1></center>
>> > <hr><center>nginx/1.12.2</center>
>> > </body>
>> > </html>
>> > '
>> >
>> > I wonder could the API be changed so that the request doesn't include
>> > the body of the method, but only its selector, class and timestamp?  The
>> > issue would appear to be here:
>> >
>> > httpGet: actionString for: aMCDefinition
>> >       ^ HTTPSocket
>> >               httpGet: self locationWithTrailingSlash
>> >               args:
>> >                       { 'action'->{actionString}.
>> >                       'mc-definition'-> {self serializeForRequest:
>> > aMCDefinition}}
>> >               user: self user
>> >               passwd: self password
>> >
>> > Copying the aMCDefinition instance and setting its source to something
>> > small (nil?, the empty string?, the selector?) would solve the size problem.
>> > What info does the server require?
>>
>>
>> The problem here is _not_ the body of the method, but rather the requested
>> URL.
>>
>> Can you give us the value of 'self locationWithTrailingSlash' for that
>> method?
>>
>> -=-=-
>> Never mind, the problem is that this is a GET request that serializes the
>> WHOLE definition into the URL.
>>
>> It would be better to make that a POST and encode 'action' and
>> 'mc-defintion' in the POST's body
>
>
> +1
>
>>
>>
>>
>> Best regards
>>         -Tobias
>>
>>
>
>
>
> --
> _,,,^..^,,,_
> best, Eliot
>
>
>