Seaside-REST, PUT, and the Server adaptors

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

Seaside-REST, PUT, and the Server adaptors

Tobias Pape
Dear all

I played around with the Seaside-REST-portion for SqueakSource3
by Phillippe, and I figured, that it depends (at least for Squeak/Pharo)
 on the Adaptor whether it is possible to use PUT-Requests or not:

Having this code:
putMap: fileName ofProject: projectName
        <PUT>
        <Path: '/{projectName}/{fileName}.mcm'>
        | data |
        data := self requestContext request rawBody.

When using the Swazoo-Adaptor, data is nil, whatever I try
(certain combinations of raw sending, url-encode, form-encode
and the like), When using the Comanche-Adaptor, this works
easily.

Just FYI.

So Long
        -Toibias

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Seaside-REST, PUT, and the Server adaptors

Sven Van Caekenberghe

On 05 Apr 2011, at 10:42, Tobias Pape wrote:

> When using the Swazoo-Adaptor, data is nil, whatever I try
> (certain combinations of raw sending, url-encode, form-encode
> and the like), When using the Comanche-Adaptor, this works easily.

It should also work with ZnZincServerAdaptor, if not I would be happy to learn about any problems and be willing to help fix them.

Regards,

Sven

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Seaside-REST, PUT, and the Server adaptors

Tobias Pape
In reply to this post by Tobias Pape
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi
Am 2011-04-05 um 10:42 schrieb Tobias Pape:

> Dear all
>
> I played around with the Seaside-REST-portion for SqueakSource3
> by Phillippe, and I figured, that it depends (at least for Squeak/Pharo)
> on the Adaptor whether it is possible to use PUT-Requests or not:
>
> Having this code:
> putMap: fileName ofProject: projectName
> <PUT>
> <Path: '/{projectName}/{fileName}.mcm'>
> | data |
> data := self requestContext request rawBody.
>
> When using the Swazoo-Adaptor, data is nil, whatever I try
> (certain combinations of raw sending, url-encode, form-encode
> and the like), When using the Comanche-Adaptor, this works
> easily.

Sorry for self-followup, but I think I found a fix.
See http://code.google.com/p/glassdb/issues/detail?id=261

So Long,
        -Tobias
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org

iEYEARECAAYFAk2d76gACgkQcPVIrP6PLKv+qACfXOZ55rID0ULAFJNhK9/owIP+
1KUAn0DaEN/D4jq5xr0O7GO5grmZqymm
=UdCH
-----END PGP SIGNATURE-----
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Seaside-REST, PUT, and the Server adaptors

Philippe Marschall
In reply to this post by Tobias Pape
2011/4/5 Tobias Pape <[hidden email]>:

> Dear all
>
> I played around with the Seaside-REST-portion for SqueakSource3
> by Phillippe, and I figured, that it depends (at least for Squeak/Pharo)
>  on the Adaptor whether it is possible to use PUT-Requests or not:
>
> Having this code:
> putMap: fileName ofProject: projectName
>        <PUT>
>        <Path: '/{projectName}/{fileName}.mcm'>
>        | data |
>        data := self requestContext request rawBody.
>
> When using the Swazoo-Adaptor, data is nil, whatever I try
> (certain combinations of raw sending, url-encode, form-encode
> and the like)

Do you have a dump of the request? Do you have an easy way to
reproduce it (Pharo 1.1 doesn't seem to ship with mcm)? I tried
something very simple and could not reproduce it immediately.

Cheers
Philippe
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Seaside-REST, PUT, and the Server adaptors

Tobias Pape

Am 2011-04-14 um 18:40 schrieb Philippe Marschall:

> 2011/4/5 Tobias Pape <[hidden email]>:
>> Dear all
>>
>> I played around with the Seaside-REST-portion for SqueakSource3
>> by Phillippe, and I figured, that it depends (at least for Squeak/Pharo)
>>  on the Adaptor whether it is possible to use PUT-Requests or not:
>>
>> Having this code:
>> putMap: fileName ofProject: projectName
>>        <PUT>
>>        <Path: '/{projectName}/{fileName}.mcm'>
>>        | data |
>>        data := self requestContext request rawBody.
>>
>> When using the Swazoo-Adaptor, data is nil, whatever I try
>> (certain combinations of raw sending, url-encode, form-encode
>> and the like)
>
> Do you have a dump of the request? Do you have an easy way to
> reproduce it (Pharo 1.1 doesn't seem to ship with mcm)? I tried
> something very simple and could not reproduce it immediately.

Dump at the end
the point isn't the mcm but the rawBody being nil when Using
Swazoo.

So any

putSomething: fileName
        <PUT>
        <Path: '/fileName'>
        | data |
        data := self requestContext request rawBody.

shall result in data being nil.
( I verified in the Seaside OneClick)

put was done using:
curl -v -X PUT -T Seaside-GemStone-REST-Core-topa.2.mcz http://localhost:8888/rest/

So Long,
        -Tobias

=====
MyFilter(Object)>>halt
        Receiver: a MyFilter
        Arguments and temporary variables:

        Receiver's instance variables:
                filter: a WAValueHolder contents: a MyFilter
                parent: a WADispatcher
                configuration: a WAUserConfiguration
                routes: a WAByMethodRoutes

MyFilter>>putSomething:
        Receiver: a MyFilter
        Arguments and temporary variables:
                fileName: 'Seaside-GemStone-REST-Core-topa.2.mcz'
                data: nil
        Receiver's instance variables:
                filter: a WAValueHolder contents: a MyFilter
                parent: a WADispatcher
                configuration: a WAUserConfiguration
                routes: a WAByMethodRoutes

WAComplexRoute(WARoute)>>sendSelectorWith:to:
        Receiver: a WAComplexRoute
        Arguments and temporary variables:
                anArrayOfArguments: #('Seaside-GemStone-REST-Core-topa.2.mcz')
                anObject: a MyFilter
        Receiver's instance variables:
                method: 'PUT'
                selector: #putSomething:
                produces: a WAWildcardMimeTypeMatch
                consumes: a WAWildcardMimeTypeMatch
                pathMatches: an OrderedCollection(a WAFullPlaceholderPathMatch)
                parameterMatches: a Dictionary()
                isOverlyComplex: false

WARouteResult>>sendMessageTo:
        Receiver: a WARouteResult
        Arguments and temporary variables:
                anObject: a MyFilter
                arguments: #('Seaside-GemStone-REST-Core-topa.2.mcz')
        Receiver's instance variables:
                route: a WAComplexRoute
                elements: #('Seaside-GemStone-REST-Core-topa.2.mcz')
                parameters: a WARequestFields()

MyFilter(WARestfulHandler)>>executeResult:
        Receiver: a MyFilter
        Arguments and temporary variables:
                aRouteResult: a WARouteResult
        Receiver's instance variables:
                filter: a WAValueHolder contents: a MyFilter
                parent: a WADispatcher
                configuration: a WAUserConfiguration
                routes: a WAByMethodRoutes

MyFilter(WARestfulHandler)>>handleFiltered:
        Receiver: a MyFilter
        Arguments and temporary variables:
                aRequestContext: a WARequestContext url: '/rest/Seaside-GemStone-REST-Core-topa...etc...
                result: a WARouteResult
        Receiver's instance variables:
                filter: a WAValueHolder contents: a MyFilter
                parent: a WADispatcher
                configuration: a WAUserConfiguration
                routes: a WAByMethodRoutes

[] in MyFilter(WARequestHandler)>>handle:
        Receiver: a MyFilter
        Arguments and temporary variables:
                aRequestContext: a WARequestContext url: '/rest/Seaside-GemStone-REST-Core-topa...etc...
        Receiver's instance variables:
                filter: a WAValueHolder contents: a MyFilter
                parent: a WADispatcher
                configuration: a WAUserConfiguration
                routes: a WAByMethodRoutes

BlockClosure>>on:do:
        Receiver: [self filter handleFiltered: aRequestContext]
        Arguments and temporary variables:
                exception: WACurrentRequestContext
                handlerAction: [:notification | notification resume: anObject]
                handlerActive: true
        Receiver's instance variables:
                outerContext: MyFilter(WARequestHandler)>>handle:
                startpc: 32
                numArgs: 0

WACurrentRequestContext class(WADynamicVariable class)>>use:during:
        Receiver: WACurrentRequestContext
        Arguments and temporary variables:
                anObject: a WARequestContext url: '/rest/Seaside-GemStone-REST-Core-topa.2.mcz'...etc...
                aBlock: [self filter handleFiltered: aRequestContext]
        Receiver's instance variables:
                superclass: WADynamicVariable
                methodDict: a MethodDictionary()
                format: 140
                instanceVariables: nil
                organization: ('as yet unclassified')

                subclasses: nil
                name: #WACurrentRequestContext
                classPool: nil
                sharedPools: nil
                environment: a SystemDictionary(lots of globals)
                category: #'Seaside-Core-RequestHandling'
                traitComposition: {}
                localSelectors: nil

[] in WARequestContext>>push:while:
        Receiver: a WARequestContext url: '/rest/Seaside-GemStone-REST-Core-topa.2.mcz'
        Arguments and temporary variables:
                aBlock: [self filter handleFiltered: aRequestContext]
        Receiver's instance variables:
                handlers: an OrderedCollection(a MyFilter a WADispatcher)
                request: a WARequest method: PUT uri: /rest/Seaside-GemStone-REST-Core-topa.2.m...etc...
                response: a WABufferedResponse status: 200 message: 'OK'
                codec: a GRNullCodec name: '(none)'
                consumer: a WAPathConsumer
                properties: nil

BlockClosure>>ensure:
        Receiver: [WACurrentRequestContext use: self during: aBlock]
        Arguments and temporary variables:
                aBlock: [handlers removeFirst]
                complete: nil
                returnValue: nil
        Receiver's instance variables:
                outerContext: WARequestContext>>push:while:
                startpc: 42
                numArgs: 0

WARequestContext>>push:while:
        Receiver: a WARequestContext url: '/rest/Seaside-GemStone-REST-Core-topa.2.mcz'
        Arguments and temporary variables:
                aRequestHandler: a MyFilter
                aBlock: [self filter handleFiltered: aRequestContext]
        Receiver's instance variables:
                handlers: an OrderedCollection(a MyFilter a WADispatcher)
                request: a WARequest method: PUT uri: /rest/Seaside-GemStone-REST-Core-topa.2.m...etc...
                response: a WABufferedResponse status: 200 message: 'OK'
                codec: a GRNullCodec name: '(none)'
                consumer: a WAPathConsumer
                properties: nil

MyFilter(WARequestHandler)>>handle:
        Receiver: a MyFilter
        Arguments and temporary variables:
                aRequestContext: a WARequestContext url: '/rest/Seaside-GemStone-REST-Core-topa...etc...
        Receiver's instance variables:
                filter: a WAValueHolder contents: a MyFilter
                parent: a WADispatcher
                configuration: a WAUserConfiguration
                routes: a WAByMethodRoutes

WADispatcher>>handleFiltered:named:
        Receiver: a WADispatcher
        Arguments and temporary variables:
                aRequestContext: a WARequestContext url: '/rest/Seaside-GemStone-REST-Core-topa...etc...
                aString: 'rest'
        Receiver's instance variables:
                filter: a WAValueHolder contents: a WADispatcher
                parent: nil
                configuration: a WAUserConfiguration
                defaultName: 'browse'
                handlers: a Dictionary('browse'->a WAApplication 'comet'->a WADispatcher 'confi...etc...

WADispatcher>>handleFiltered:
        Receiver: a WADispatcher
        Arguments and temporary variables:
                aRequestContext: a WARequestContext url: '/rest/Seaside-GemStone-REST-Core-topa...etc...
                consumer: a WAPathConsumer
        Receiver's instance variables:
                filter: a WAValueHolder contents: a WADispatcher
                parent: nil
                configuration: a WAUserConfiguration
                defaultName: 'browse'
                handlers: a Dictionary('browse'->a WAApplication 'comet'->a WADispatcher 'confi...etc...

[] in WADispatcher(WARequestHandler)>>handle:
        Receiver: a WADispatcher
        Arguments and temporary variables:
                aRequestContext: a WARequestContext url: '/rest/Seaside-GemStone-REST-Core-topa...etc...
        Receiver's instance variables:
                filter: a WAValueHolder contents: a WADispatcher
                parent: nil
                configuration: a WAUserConfiguration
                defaultName: 'browse'
                handlers: a Dictionary('browse'->a WAApplication 'comet'->a WADispatcher 'confi...etc...

BlockClosure>>on:do:
        Receiver: [self filter handleFiltered: aRequestContext]
        Arguments and temporary variables:
                exception: WACurrentRequestContext
                handlerAction: [:notification | notification resume: anObject]
                handlerActive: true
        Receiver's instance variables:
                outerContext: WADispatcher(WARequestHandler)>>handle:
                startpc: 32
                numArgs: 0

WACurrentRequestContext class(WADynamicVariable class)>>use:during:
        Receiver: WACurrentRequestContext
        Arguments and temporary variables:
                anObject: a WARequestContext url: '/rest/Seaside-GemStone-REST-Core-topa.2.mcz'...etc...
                aBlock: [self filter handleFiltered: aRequestContext]
        Receiver's instance variables:
                superclass: WADynamicVariable
                methodDict: a MethodDictionary()
                format: 140
                instanceVariables: nil
                organization: ('as yet unclassified')

                subclasses: nil
                name: #WACurrentRequestContext
                classPool: nil
                sharedPools: nil
                environment: a SystemDictionary(lots of globals)
                category: #'Seaside-Core-RequestHandling'
                traitComposition: {}
                localSelectors: nil

[] in WARequestContext>>push:while:
        Receiver: a WARequestContext url: '/rest/Seaside-GemStone-REST-Core-topa.2.mcz'
        Arguments and temporary variables:
                aBlock: [self filter handleFiltered: aRequestContext]
        Receiver's instance variables:
                handlers: an OrderedCollection(a MyFilter a WADispatcher)
                request: a WARequest method: PUT uri: /rest/Seaside-GemStone-REST-Core-topa.2.m...etc...
                response: a WABufferedResponse status: 200 message: 'OK'
                codec: a GRNullCodec name: '(none)'
                consumer: a WAPathConsumer
                properties: nil

BlockClosure>>ensure:
        Receiver: [WACurrentRequestContext use: self during: aBlock]
        Arguments and temporary variables:
                aBlock: [handlers removeFirst]
                complete: nil
                returnValue: nil
        Receiver's instance variables:
                outerContext: WARequestContext>>push:while:
                startpc: 42
                numArgs: 0

WARequestContext>>push:while:
        Receiver: a WARequestContext url: '/rest/Seaside-GemStone-REST-Core-topa.2.mcz'
        Arguments and temporary variables:
                aRequestHandler: a WADispatcher
                aBlock: [self filter handleFiltered: aRequestContext]
        Receiver's instance variables:
                handlers: an OrderedCollection(a MyFilter a WADispatcher)
                request: a WARequest method: PUT uri: /rest/Seaside-GemStone-REST-Core-topa.2.m...etc...
                response: a WABufferedResponse status: 200 message: 'OK'
                codec: a GRNullCodec name: '(none)'
                consumer: a WAPathConsumer
                properties: nil

WADispatcher(WARequestHandler)>>handle:
        Receiver: a WADispatcher
        Arguments and temporary variables:
                aRequestContext: a WARequestContext url: '/rest/Seaside-GemStone-REST-Core-topa...etc...
        Receiver's instance variables:
                filter: a WAValueHolder contents: a WADispatcher
                parent: nil
                configuration: a WAUserConfiguration
                defaultName: 'browse'
                handlers: a Dictionary('browse'->a WAApplication 'comet'->a WADispatcher 'confi...etc...

[] in WASwazooAdaptor(WAServerAdaptor)>>handleRequest:
        Receiver: a WASwazooAdaptor
        Arguments and temporary variables:
                aRequestContext: a WARequestContext url: '/rest/Seaside-GemStone-REST-Core-topa...etc...
        Receiver's instance variables:
                manager: a WAServerManager
                port: 8888
                requestHandler: nil
                codec: a GRNullCodec name: '(none)'
                site: a WAPluggableSite

BlockClosure>>on:do:
        Receiver: [self requestHandler handle: aRequestContext]
        Arguments and temporary variables:
                exception: WAResponseNotification
                handlerAction: [:n | nil]
                handlerActive: true
        Receiver's instance variables:
                outerContext: WASwazooAdaptor(WAServerAdaptor)>>handleRequest:
                startpc: 34
                numArgs: 0

WASwazooAdaptor(WAServerAdaptor)>>handleRequest:
        Receiver: a WASwazooAdaptor
        Arguments and temporary variables:
                aRequestContext: a WARequestContext url: '/rest/Seaside-GemStone-REST-Core-topa...etc...
        Receiver's instance variables:
                manager: a WAServerManager
                port: 8888
                requestHandler: nil
                codec: a GRNullCodec name: '(none)'
                site: a WAPluggableSite

WASwazooAdaptor(WAServerAdaptor)>>handle:
        Receiver: a WASwazooAdaptor
        Arguments and temporary variables:
                aRequestContext: a WARequestContext url: '/rest/Seaside-GemStone-REST-Core-topa...etc...
        Receiver's instance variables:
                manager: a WAServerManager
                port: 8888
                requestHandler: nil
                codec: a GRNullCodec name: '(none)'
                site: a WAPluggableSite

[] in WASwazooAdaptor(WAServerAdaptor)>>process:
        Receiver: a WASwazooAdaptor
        Arguments and temporary variables:
                context: a WARequestContext url: '/rest/Seaside-GemStone-REST-Core-topa.2.mcz'
        Receiver's instance variables:
                manager: a WAServerManager
                port: 8888
                requestHandler: nil
                codec: a GRNullCodec name: '(none)'
                site: a WAPluggableSite

BlockClosure>>ensure:
        Receiver: [self handle: context;
                 responseFrom: context]
        Arguments and temporary variables:
                aBlock: [context destroy]
                complete: nil
                returnValue: nil
        Receiver's instance variables:
                outerContext: WASwazooAdaptor(WAServerAdaptor)>>process:
                startpc: 42
                numArgs: 0

WASwazooAdaptor(WAServerAdaptor)>>process:
        Receiver: a WASwazooAdaptor
        Arguments and temporary variables:
                aNativeRequest: a HTTPRequest PUT
         from: 127.0.0.1
         at: 14 April 2011 7:26:15...etc...
                context: a WARequestContext url: '/rest/Seaside-GemStone-REST-Core-topa.2.mcz'
        Receiver's instance variables:
                manager: a WAServerManager
                port: 8888
                requestHandler: nil
                codec: a GRNullCodec name: '(none)'
                site: a WAPluggableSite

WAPluggableSite>>answerTo:
        Receiver: a WAPluggableSite
        Arguments and temporary variables:
                aSwazooRequest: a HTTPRequest PUT
         from: 127.0.0.1
         at: 14 April 2011 7:26:15...etc...
        Receiver's instance variables:
                enabled: true
                uriPattern: an OrderedCollection(a SiteIdentifier)
                parent: a ServerRootComposite
                children: an OrderedCollection()
                name: 'JdtXFS6WW74pqWQaTtDjP2FM1351bdiw'
                serving: true
                handler: a WASwazooAdaptor

WAPluggableSite>>helpResolve:
        Receiver: a WAPluggableSite
        Arguments and temporary variables:
                aResolution: an URIResolution
        Receiver's instance variables:
                enabled: true
                uriPattern: an OrderedCollection(a SiteIdentifier)
                parent: a ServerRootComposite
                children: an OrderedCollection()
                name: 'JdtXFS6WW74pqWQaTtDjP2FM1351bdiw'
                serving: true
                handler: a WASwazooAdaptor

URIResolution>>visitResource:
        Receiver: an URIResolution
        Arguments and temporary variables:
                aResource: a WAPluggableSite
        Receiver's instance variables:
                position: 1
                request: a HTTPRequest PUT
         from: 127.0.0.1
         at: 14 April 2011 7:26:15 pm
         h...etc...

[] in URIResolution>>visitChildrenOf:advancing:
        Receiver: an URIResolution
        Arguments and temporary variables:
                response: a WAPluggableSite
                each: #(nil)
        Receiver's instance variables:
                position: 1
                request: a HTTPRequest PUT
         from: 127.0.0.1
         at: 14 April 2011 7:26:15 pm
         h...etc...

OrderedCollection>>do:
        Receiver: an OrderedCollection(a WAPluggableSite)
        Arguments and temporary variables:
                aBlock: [:each |
response := self visitResource: each.
        response isNil
                ifFal...etc...
                index: 3
        Receiver's instance variables:
                array: an Array(nil nil a WAPluggableSite nil nil nil nil nil nil nil)
                firstIndex: 3
                lastIndex: 3

URIResolution>>visitChildrenOf:advancing:
        Receiver: an URIResolution
        Arguments and temporary variables:
                aResource: a ServerRootComposite
                aBoolean: false
                response: #(nil)
        Receiver's instance variables:
                position: 1
                request: a HTTPRequest PUT
         from: 127.0.0.1
         at: 14 April 2011 7:26:15 pm
         h...etc...

URIResolution>>resolveTransparentComposite:
        Receiver: an URIResolution
        Arguments and temporary variables:
                aCompositeResource: a ServerRootComposite
        Receiver's instance variables:
                position: 1
                request: a HTTPRequest PUT
         from: 127.0.0.1
         at: 14 April 2011 7:26:15 pm
         h...etc...

URIResolution>>resolveServerRoot:
        Receiver: an URIResolution
        Arguments and temporary variables:
                aServerRoot: a ServerRootComposite
        Receiver's instance variables:
                position: 1
                request: a HTTPRequest PUT
         from: 127.0.0.1
         at: 14 April 2011 7:26:15 pm
         h...etc...

ServerRootComposite>>helpResolve:
        Receiver: a ServerRootComposite
        Arguments and temporary variables:
                aResolution: an URIResolution
        Receiver's instance variables:
                enabled: true
                uriPattern: ''
                parent: nil
                children: an OrderedCollection(a WAPluggableSite)

URIResolution>>visitResource:
        Receiver: an URIResolution
        Arguments and temporary variables:
                aResource: a ServerRootComposite
        Receiver's instance variables:
                position: 1
                request: a HTTPRequest PUT
         from: 127.0.0.1
         at: 14 April 2011 7:26:15 pm
         h...etc...


--- The full stack ---
MyFilter(Object)>>halt
MyFilter>>putSomething:
WAComplexRoute(WARoute)>>sendSelectorWith:to:
WARouteResult>>sendMessageTo:
MyFilter(WARestfulHandler)>>executeResult:
MyFilter(WARestfulHandler)>>handleFiltered:
[] in MyFilter(WARequestHandler)>>handle:
BlockClosure>>on:do:
WACurrentRequestContext class(WADynamicVariable class)>>use:during:
[] in WARequestContext>>push:while:
BlockClosure>>ensure:
WARequestContext>>push:while:
MyFilter(WARequestHandler)>>handle:
WADispatcher>>handleFiltered:named:
WADispatcher>>handleFiltered:
[] in WADispatcher(WARequestHandler)>>handle:
BlockClosure>>on:do:
WACurrentRequestContext class(WADynamicVariable class)>>use:during:
[] in WARequestContext>>push:while:
BlockClosure>>ensure:
WARequestContext>>push:while:
WADispatcher(WARequestHandler)>>handle:
[] in WASwazooAdaptor(WAServerAdaptor)>>handleRequest:
BlockClosure>>on:do:
WASwazooAdaptor(WAServerAdaptor)>>handleRequest:
WASwazooAdaptor(WAServerAdaptor)>>handle:
[] in WASwazooAdaptor(WAServerAdaptor)>>process:
BlockClosure>>ensure:
WASwazooAdaptor(WAServerAdaptor)>>process:
WAPluggableSite>>answerTo:
WAPluggableSite>>helpResolve:
URIResolution>>visitResource:
[] in URIResolution>>visitChildrenOf:advancing:
OrderedCollection>>do:
URIResolution>>visitChildrenOf:advancing:
URIResolution>>resolveTransparentComposite:
URIResolution>>resolveServerRoot:
ServerRootComposite>>helpResolve:
URIResolution>>visitResource:
 - - - - - - - - - - - - - - -  
                        - - - - - - - - - - - - - - - - - -
URIResolution class>>resolveRequest:startingAt:
HTTPServer>>answerTo:
HTTPConnection>>produceResponseFor:
HTTPConnection>>getAndDispatchMessages
[] in [] in [] in HTTPConnection>>interact
BlockClosure>>on:do:
[] in [] in HTTPConnection>>interact
BlockClosure>>ifCurtailed:
[] in HTTPConnection>>interact


_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Seaside-REST, PUT, and the Server adaptors

Philippe Marschall
2011/4/14 Tobias Pape <[hidden email]>:

>
> Am 2011-04-14 um 18:40 schrieb Philippe Marschall:
>
>> 2011/4/5 Tobias Pape <[hidden email]>:
>>> Dear all
>>>
>>> I played around with the Seaside-REST-portion for SqueakSource3
>>> by Phillippe, and I figured, that it depends (at least for Squeak/Pharo)
>>>  on the Adaptor whether it is possible to use PUT-Requests or not:
>>>
>>> Having this code:
>>> putMap: fileName ofProject: projectName
>>>        <PUT>
>>>        <Path: '/{projectName}/{fileName}.mcm'>
>>>        | data |
>>>        data := self requestContext request rawBody.
>>>
>>> When using the Swazoo-Adaptor, data is nil, whatever I try
>>> (certain combinations of raw sending, url-encode, form-encode
>>> and the like)
>>
>> Do you have a dump of the request? Do you have an easy way to
>> reproduce it (Pharo 1.1 doesn't seem to ship with mcm)? I tried
>> something very simple and could not reproduce it immediately.
>
> Dump at the end
> the point isn't the mcm but the rawBody being nil when Using
> Swazoo.
>
> So any
>
> putSomething: fileName
>        <PUT>
>        <Path: '/fileName'>
>        | data |
>        data := self requestContext request rawBody.
>
> shall result in data being nil.
> ( I verified in the Seaside OneClick)
>
> put was done using:
> curl -v -X PUT -T Seaside-GemStone-REST-Core-topa.2.mcz http://localhost:8888/rest/

Thanks, I'll try that. Can you tell me which version of Swazoo you use?

Cheers
Philippe
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Seaside-REST, PUT, and the Server adaptors

Tobias Pape

Am 2011-04-15 um 09:40 schrieb Philippe Marschall:

> 2011/4/14 Tobias Pape <[hidden email]>:
>>
>> Am 2011-04-14 um 18:40 schrieb Philippe Marschall:
>>
>>> 2011/4/5 Tobias Pape <[hidden email]>:
>>>> Dear all
>>>>
>>>> I played around with the Seaside-REST-portion for SqueakSource3
>>>> by Phillippe, and I figured, that it depends (at least for Squeak/Pharo)
>>>>  on the Adaptor whether it is possible to use PUT-Requests or not:
>>>>
>>>> Having this code:
>>>> putMap: fileName ofProject: projectName
>>>>        <PUT>
>>>>        <Path: '/{projectName}/{fileName}.mcm'>
>>>>        | data |
>>>>        data := self requestContext request rawBody.
>>>>
>>>> When using the Swazoo-Adaptor, data is nil, whatever I try
>>>> (certain combinations of raw sending, url-encode, form-encode
>>>> and the like)
>>>
>>> Do you have a dump of the request? Do you have an easy way to
>>> reproduce it (Pharo 1.1 doesn't seem to ship with mcm)? I tried
>>> something very simple and could not reproduce it immediately.
>>
>> Dump at the end
>> the point isn't the mcm but the rawBody being nil when Using
>> Swazoo.
>>
>> So any
>>
>> putSomething: fileName
>>        <PUT>
>>        <Path: '/fileName'>
>>        | data |
>>        data := self requestContext request rawBody.
>>
>> shall result in data being nil.
>> ( I verified in the Seaside OneClick)
>>
>> put was done using:
>> curl -v -X PUT -T Seaside-GemStone-REST-Core-topa.2.mcz http://localhost:8888/rest/
>
> Thanks, I'll try that. Can you tell me which version of Swazoo you use?

the one that is installed with the 3.0.4 Seaside Version when requesting 'Seaside-Adaptors-Swazoo'

I'll have a look at some code I and some guys wrote two
years ago, I think we already 'fixed' that


So Long,
        -Tobias_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Seaside-REST, PUT, and the Server adaptors

Tobias Pape

Am 2011-04-15 um 12:13 schrieb Tobias Pape:

>>>
>>> put was done using:
>>> curl -v -X PUT -T Seaside-GemStone-REST-Core-topa.2.mcz http://localhost:8888/rest/
>>
>> Thanks, I'll try that. Can you tell me which version of Swazoo you use?
>
> the one that is installed with the 3.0.4 Seaside Version when requesting 'Seaside-Adaptors-Swazoo'
>
> I'll have a look at some code I and some guys wrote two
> years ago, I think we already 'fixed' that
>

Ok, I just forgot my own Email to this list:
<[hidden email]>
(http://permalink.gmane.org/gmane.comp.lang.smalltalk.squeak.seaside/24213)

The fix is in:
http://code.google.com/p/glassdb/issues/detail?id=261

> HTTPPut implements #readFrom: wich is never sent.
> However, it should implement #for:readFrom: in order
> to  set its field as done in #readFrom:.
>
> To make a long story short:
>
> change
> #readFrom: aStream
> to
> #for: aRequestLine readFrom: aStream
>
> and do the same for the super call.

That is:

HTTPPut
-readFrom: aStream
+for: aRequestLine readFrom: aStream
        | contentTypeField |
- super readFrom: aStream.
+ super for: aRequestLine readFrom: aStream.
        contentTypeField := self headers fieldOfClass: ContentTypeField
                                ifNone: [SwazooHTTPPutError raiseSignal: 'Missing Content-Type'].
        contentTypeField mediaType = 'application/octet-stream'
                ifTrue: [self octetDataFrom: aStream]
                ifFalse: [self urlencodedDataFrom: aStream].
        ^self

So Long,
        -Tobias_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Seaside-REST, PUT, and the Server adaptors

Philippe Marschall
2011/4/15 Tobias Pape <[hidden email]>:

>
> Am 2011-04-15 um 12:13 schrieb Tobias Pape:
>>>>
>>>> put was done using:
>>>> curl -v -X PUT -T Seaside-GemStone-REST-Core-topa.2.mcz http://localhost:8888/rest/
>>>
>>> Thanks, I'll try that. Can you tell me which version of Swazoo you use?
>>
>> the one that is installed with the 3.0.4 Seaside Version when requesting 'Seaside-Adaptors-Swazoo'
>>
>> I'll have a look at some code I and some guys wrote two
>> years ago, I think we already 'fixed' that
>>
>
> Ok, I just forgot my own Email to this list:
> <[hidden email]>
> (http://permalink.gmane.org/gmane.comp.lang.smalltalk.squeak.seaside/24213)
>
> The fix is in:
> http://code.google.com/p/glassdb/issues/detail?id=261
>
>> HTTPPut implements #readFrom: wich is never sent.
>> However, it should implement #for:readFrom: in order
>> to  set its field as done in #readFrom:.
>>
>> To make a long story short:
>>
>> change
>> #readFrom: aStream
>> to
>> #for: aRequestLine readFrom: aStream
>>
>> and do the same for the super call.
>
> That is:
>
> HTTPPut
> -readFrom: aStream
> +for: aRequestLine readFrom: aStream
>        | contentTypeField |
> -       super readFrom: aStream.
> +       super for: aRequestLine readFrom: aStream.
>        contentTypeField := self headers fieldOfClass: ContentTypeField
>                                ifNone: [SwazooHTTPPutError raiseSignal: 'Missing Content-Type'].
>        contentTypeField mediaType = 'application/octet-stream'
>                ifTrue: [self octetDataFrom: aStream]
>                ifFalse: [self urlencodedDataFrom: aStream].
>        ^self

Ah, you're on GemStone, that explains why I couldn't observe this.
Thanks for debugging and reporting.

Cheers
Philippe
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Seaside-REST, PUT, and the Server adaptors

Tobias Pape

Am 2011-04-17 um 20:01 schrieb Philippe Marschall:

> 2011/4/15 Tobias Pape <[hidden email]>:
>>
>> Am 2011-04-15 um 12:13 schrieb Tobias Pape:
>>>>>
>>>>> put was done using:
>>>>> curl -v -X PUT -T Seaside-GemStone-REST-Core-topa.2.mcz http://localhost:8888/rest/
>>>>
>>>> Thanks, I'll try that. Can you tell me which version of Swazoo you use?
>>>
>>> the one that is installed with the 3.0.4 Seaside Version when requesting 'Seaside-Adaptors-Swazoo'
>>>
>>> I'll have a look at some code I and some guys wrote two
>>> years ago, I think we already 'fixed' that
>>>
>>
>> Ok, I just forgot my own Email to this list:
>> <[hidden email]>
>> (http://permalink.gmane.org/gmane.comp.lang.smalltalk.squeak.seaside/24213)
>>
>> The fix is in:
>> http://code.google.com/p/glassdb/issues/detail?id=261
>>
>>> HTTPPut implements #readFrom: wich is never sent.
>>> However, it should implement #for:readFrom: in order
>>> to  set its field as done in #readFrom:.
>>>
>>> To make a long story short:
>>>
>>> change
>>> #readFrom: aStream
>>> to
>>> #for: aRequestLine readFrom: aStream
>>>
>>> and do the same for the super call.
>>
>> That is:
>>
>> HTTPPut
>> -readFrom: aStream
>> +for: aRequestLine readFrom: aStream
>>        | contentTypeField |
>> -       super readFrom: aStream.
>> +       super for: aRequestLine readFrom: aStream.
>>        contentTypeField := self headers fieldOfClass: ContentTypeField
>>                                ifNone: [SwazooHTTPPutError raiseSignal: 'Missing Content-Type'].
>>        contentTypeField mediaType = 'application/octet-stream'
>>                ifTrue: [self octetDataFrom: aStream]
>>                ifFalse: [self urlencodedDataFrom: aStream].
>>        ^self
>
> Ah, you're on GemStone, that explains why I couldn't observe this.
> Thanks for debugging and reporting.

Stop, I saw this on all
Seaside.app (ie, Pharo),
Squeak4.2, and
GemStone

So Long,
        -Tobias_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Seaside-REST, PUT, and the Server adaptors

Philippe Marschall
2011/4/17 Tobias Pape <[hidden email]>:

>
> Am 2011-04-17 um 20:01 schrieb Philippe Marschall:
>
>> 2011/4/15 Tobias Pape <[hidden email]>:
>>>
>>> Am 2011-04-15 um 12:13 schrieb Tobias Pape:
>>>>>>
>>>>>> put was done using:
>>>>>> curl -v -X PUT -T Seaside-GemStone-REST-Core-topa.2.mcz http://localhost:8888/rest/
>>>>>
>>>>> Thanks, I'll try that. Can you tell me which version of Swazoo you use?
>>>>
>>>> the one that is installed with the 3.0.4 Seaside Version when requesting 'Seaside-Adaptors-Swazoo'
>>>>
>>>> I'll have a look at some code I and some guys wrote two
>>>> years ago, I think we already 'fixed' that
>>>>
>>>
>>> Ok, I just forgot my own Email to this list:
>>> <[hidden email]>
>>> (http://permalink.gmane.org/gmane.comp.lang.smalltalk.squeak.seaside/24213)
>>>
>>> The fix is in:
>>> http://code.google.com/p/glassdb/issues/detail?id=261
>>>
>>>> HTTPPut implements #readFrom: wich is never sent.
>>>> However, it should implement #for:readFrom: in order
>>>> to  set its field as done in #readFrom:.
>>>>
>>>> To make a long story short:
>>>>
>>>> change
>>>> #readFrom: aStream
>>>> to
>>>> #for: aRequestLine readFrom: aStream
>>>>
>>>> and do the same for the super call.
>>>
>>> That is:
>>>
>>> HTTPPut
>>> -readFrom: aStream
>>> +for: aRequestLine readFrom: aStream
>>>        | contentTypeField |
>>> -       super readFrom: aStream.
>>> +       super for: aRequestLine readFrom: aStream.
>>>        contentTypeField := self headers fieldOfClass: ContentTypeField
>>>                                ifNone: [SwazooHTTPPutError raiseSignal: 'Missing Content-Type'].
>>>        contentTypeField mediaType = 'application/octet-stream'
>>>                ifTrue: [self octetDataFrom: aStream]
>>>                ifFalse: [self urlencodedDataFrom: aStream].
>>>        ^self
>>
>> Ah, you're on GemStone, that explains why I couldn't observe this.
>> Thanks for debugging and reporting.
>
> Stop, I saw this on all
> Seaside.app (ie, Pharo),
> Squeak4.2, and
> GemStone

Does this happen if you load:
Swazoo-2.3beta2.2

Cheers
Philippe
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Seaside-REST, PUT, and the Server adaptors

Tobias Pape

Am 2011-04-18 um 07:19 schrieb Philippe Marschall:
>>
>> Stop, I saw this on all
>> Seaside.app (ie, Pharo),
>> Squeak4.2, and
>> GemStone
>
> Does this happen if you load:
> Swazoo-2.3beta2.2

The bug is gone with that version, it works fine.
Why is a 2009 version of Swazoo loaded by default when
installing seaside, anyways?

So Long,
        -Tobias
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Seaside-REST, PUT, and the Server adaptors

Dale Henrichs
On 04/18/2011 02:58 AM, Tobias Pape wrote:

>
> Am 2011-04-18 um 07:19 schrieb Philippe Marschall:
>>>
>>> Stop, I saw this on all
>>> Seaside.app (ie, Pharo),
>>> Squeak4.2, and
>>> GemStone
>>
>> Does this happen if you load:
>> Swazoo-2.3beta2.2
>
> The bug is gone with that version, it works fine.
> Why is a 2009 version of Swazoo loaded by default when
> installing seaside, anyways?
>
> So Long,
> -Tobias
> _______________________________________________
> seaside mailing list
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside

Because I don't have the time to figure out if the new version of
seaside actually works with the new version of Swazoo and I have no idea
if anyone else has done the due diligence ...

Dale
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Seaside-REST, PUT, and the Server adaptors

Philippe Marschall
2011/4/18 Dale Henrichs <[hidden email]>:

> On 04/18/2011 02:58 AM, Tobias Pape wrote:
>>
>> Am 2011-04-18 um 07:19 schrieb Philippe Marschall:
>>>>
>>>> Stop, I saw this on all
>>>> Seaside.app (ie, Pharo),
>>>> Squeak4.2, and
>>>> GemStone
>>>
>>> Does this happen if you load:
>>> Swazoo-2.3beta2.2
>>
>> The bug is gone with that version, it works fine.
>> Why is a 2009 version of Swazoo loaded by default when
>> installing seaside, anyways?
>>
>> So Long,
>>        -Tobias
>> _______________________________________________
>> seaside mailing list
>> [hidden email]
>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
> Because I don't have the time to figure out if the new version of seaside
> actually works with the new version of Swazoo and I have no idea if anyone
> else has done the due diligence ...

I did some minimal functional testing with Swazoo 2.2 and 2.3 and they
both seem to work. The very latest Seaside-Adaptors-Swazoo requires
either 2.3 or the very latest 2.2 (see #code vs. #statuCode
discussion).

Cheers
Philippe
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Seaside-REST, PUT, and the Server adaptors

Dale Henrichs
On 04/18/2011 08:50 AM, Philippe Marschall wrote:

> 2011/4/18 Dale Henrichs<[hidden email]>:
>> On 04/18/2011 02:58 AM, Tobias Pape wrote:
>>>
>>> Am 2011-04-18 um 07:19 schrieb Philippe Marschall:
>>>>>
>>>>> Stop, I saw this on all
>>>>> Seaside.app (ie, Pharo),
>>>>> Squeak4.2, and
>>>>> GemStone
>>>>
>>>> Does this happen if you load:
>>>> Swazoo-2.3beta2.2
>>>
>>> The bug is gone with that version, it works fine.
>>> Why is a 2009 version of Swazoo loaded by default when
>>> installing seaside, anyways?
>>>
>>> So Long,
>>>         -Tobias
>>> _______________________________________________
>>> seaside mailing list
>>> [hidden email]
>>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>>
>> Because I don't have the time to figure out if the new version of seaside
>> actually works with the new version of Swazoo and I have no idea if anyone
>> else has done the due diligence ...
>
> I did some minimal functional testing with Swazoo 2.2 and 2.3 and they
> both seem to work. The very latest Seaside-Adaptors-Swazoo requires
> either 2.3 or the very latest 2.2 (see #code vs. #statuCode
> discussion).
>
> Cheers
> Philippe
> _______________________________________________
> seaside mailing list
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside

The configuration can be changed to start using Swazoo2.3 for Seaside
3.0.5 if you'd like ...

Dale
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Seaside-REST, PUT, and the Server adaptors

Philippe Marschall
2011/4/18 Dale Henrichs <[hidden email]>:

> On 04/18/2011 08:50 AM, Philippe Marschall wrote:
>>
>> 2011/4/18 Dale Henrichs<[hidden email]>:
>>>
>>> On 04/18/2011 02:58 AM, Tobias Pape wrote:
>>>>
>>>> Am 2011-04-18 um 07:19 schrieb Philippe Marschall:
>>>>>>
>>>>>> Stop, I saw this on all
>>>>>> Seaside.app (ie, Pharo),
>>>>>> Squeak4.2, and
>>>>>> GemStone
>>>>>
>>>>> Does this happen if you load:
>>>>> Swazoo-2.3beta2.2
>>>>
>>>> The bug is gone with that version, it works fine.
>>>> Why is a 2009 version of Swazoo loaded by default when
>>>> installing seaside, anyways?
>>>>
>>>> So Long,
>>>>        -Tobias
>>>> _______________________________________________
>>>> seaside mailing list
>>>> [hidden email]
>>>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>>>
>>> Because I don't have the time to figure out if the new version of seaside
>>> actually works with the new version of Swazoo and I have no idea if
>>> anyone
>>> else has done the due diligence ...
>>
>> I did some minimal functional testing with Swazoo 2.2 and 2.3 and they
>> both seem to work. The very latest Seaside-Adaptors-Swazoo requires
>> either 2.3 or the very latest 2.2 (see #code vs. #statuCode
>> discussion).
>>
>> Cheers
>> Philippe
>> _______________________________________________
>> seaside mailing list
>> [hidden email]
>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
> The configuration can be changed to start using Swazoo2.3 for Seaside 3.0.5
> if you'd like ...

I think that would make sense.

Cheers
Philippe
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside