World: r3wp
[!REBOL3 Schemes] Implementors guide
older newer | first last |
Graham 5-Jan-2010 [102] | Also, if there is no content, then the content-length header is not set ... Here's my suggested changes at the bottom http://rebol.wik.is/Rebol3/Schemes/Http/Prot-http.r/Make-http-request |
BrianH 5-Jan-2010 [103x4] | 1.1 didn't work since chunked encoding was broken, so they reverted to 1.0. Proper 1.1 support is on the list to fix. |
However, chunked encoding needs to be fixed first, before 1.1 support can be reenabled. | |
The .rlp http client was also written before the Unicode changes were finished, so we need to review for those fixes too. | |
That would affect the string-vs-binary situation. | |
Graham 5-Jan-2010 [107] | I'm looking at the .r source ... |
BrianH 5-Jan-2010 [108] | Which has only been patched a few times, not yet properly reworked. |
Graham 5-Jan-2010 [109x2] | well, I think not setting the content-length header might be bug .. |
eg .. with the HEAD verb | |
BrianH 5-Jan-2010 [111] | Only if you aren't using chunked encoding. If you are, then setting Content-Length would be a bug. |
Graham 5-Jan-2010 [112] | Is this going to be rewritten so that we can stream files using PUT? |
BrianH 5-Jan-2010 [113x3] | Sure. And it's going to be rewritten so that http server mode is supported too. |
In an event handler sort of way though - no assumptions that there are going to be files that are being served. You could build a new Cheyenne on it, but it won't compete with Cheyenne itself. | |
It's more for web service application control interfaces than it is for generic web serving. | |
Graham 5-Jan-2010 [116x4] | actually where is stuff defined anyway? It appears in prot-http.r but it's not there when your probe the scheme... |
Just thinking that if you need to create signed headers eg. for Amazon requests, then these functions should be readily accessible rather than tucked inside a scheme somewhere | |
Just had another thought, if the headers already contain a content-length, then make-http-request should not set it again ... | |
This would be where you are PUT ing a binary file and you already know the length, so you set it in the spec ... | |
BrianH 5-Jan-2010 [120x2] | All the stuff is defined in the http module - it's the only part if the internals that has been put in a module, so far. |
Clarification: The http server mode is meant to be good enough for Doc to build an R3 Cheyenne on. If he feels the need to bypass it and go down to the tcp level, that would be a failure. | |
Graham 5-Jan-2010 [122] | so would I access make-http-request ? |
BrianH 5-Jan-2010 [123] | I can't say right now - ask me again tomorrow. |
Graham 5-Jan-2010 [124] | what I need is a function that traverses all the objects to find a function .... |
BrianH 5-Jan-2010 [125] | Going out :) |
Graham 5-Jan-2010 [126] | running away from me?? Happens a lot :( |
BrianH 5-Jan-2010 [127] | It's just a fling - I'll be back :) |
Graham 6-Jan-2010 [128x8] | my candle will still be burning ... |
For instance, in writing the AWS stuff, Maarten basically had to write his own http scheme ... because it wasn't easy to reuse the existing stuff. | |
I hope we can avoid that need for r3 | |
if you look at the port object! after eg. opening rebol.com, there is a port/scheme/actor object, and then the actor object seems to be duplicated in port/actor ... | |
Is there actually any documentation on using the http apart from read ? | |
http://www.rebol.net/docs/HTTPScheme state diagram.png | |
Just a question about eg. open http://www.rebol.com Does 'open take the url, turn it into a port object, and then invokes the http scheme'' open on the port object? | |
scheme's 'open on the port object? | |
Steeve 6-Jan-2010 [136x2] | actually what is the question ? :-) |
it's doing what you noted, so what ? | |
Graham 6-Jan-2010 [138] | just a stream of consciousness like Marcel Proust |
Steeve 6-Jan-2010 [139] | :-) |
Graham 6-Jan-2010 [140x2] | So, if you write your own schemes ... open must invoke the correct 'open some how |
looks like 'open is a native ... no source given | |
Steeve 6-Jan-2010 [142] | you're seeking the proto-open ? |
Graham 6-Jan-2010 [143x2] | still streaming .. |
AFAIK there's virtually no R3 documentation | |
Steeve 6-Jan-2010 [145] | i think you know this source system/intrinsic/make-port |
Graham 6-Jan-2010 [146x6] | ahh.. that helps |
there's no trace/net ? | |
I guess it's download wireshark time :( | |
HEAD / HTTP/1.0 Accept: */* Accept-Charset: utf-8 Host: www.rebol.com User-Agent: REBOL HTTP/1.1 200 OK Date: Wed, 06 Jan 2010 07:28:08 GMT Server: Apache/1.3.37 (Unix) mod_auth_passthrough/1.8 mod_log_bytes/1.2 mod_bwlimited/1.4 PHP/4.4.7 FrontPage/5.0.2.2635.SR1.2 mod_ssl/2.8.28 OpenSSL/0.9.7a Last-Modified: Fri, 01 Jan 2010 21:19:01 GMT ETag: "3f44376-2667-4b3e66c5" Accept-Ranges: bytes Content-Type: text/html Via: 1.1 bc1 Content-Length: 9831 Connection: close | |
this was from ... r: read open [ scheme: 'http host: "www.rebol.com" method: 'head port-id: 80 ] but probe r [x/ 9831 none ] | |
well I guess it tells me something is there .. as I don't get an error. But 9831 is not very useful content. | |
older newer | first last |