• Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

AltME groups: search

Help · search scripts · search articles · search mailing list

results summary

worldhits
r4wp5
r3wp125
total:130

results window for this page: [start: 1 end: 100]

world-name: r4wp

Group: #Red ... Red language group [web-public]
DocKimbel:
30-Nov-2012
:-)


File and network I/O: should be done for Christmas (maybe alpha state 
for networking). I will provide then HTTP client/server support shortly 
after. Expect more network protocols to come in Q1/Q2 2013. 2D/sound 
will be part of the work on GUI, so will happen later in 2013. Mysql 
support through networking: I will very much like to have that, as 
Postgresql support too. Expect them before summer 2013 (or maybe 
before for MySQL, if I need it for a killer Red demo). ;-)
Group: Rebol School ... REBOL School [web-public]
DocKimbel:
10-Oct-2012
Uniserve task-master is mainly meant for server-side parallel request 
processing. For your need, you should use an async HTTP client rather, 
which would be a much simpler solution.
Group: Web ... Anything related to the WWW [web-public]
Gerard:
17-Aug-2012
It seems to me that under Red, one marvelous tool which could be 
created would be similar this new one - which I just discovered ... 
at least with my not too long vision  - based on the Cheyenne HTTP 
server, it seems it could be realized using a similar approach, to 
begin with ... http://www.wakanda.org/overview- Also available 
on Github for those interested to look at the code (may be Topaz 
friends - sinc it is base entirely on Javascript).
Group: !REBOL3 ... General discussion about REBOL 3 [web-public]
GrahamC:
9-Jan-2013
since this is the trace

HEAD /index.html HTTP/1.0
Accept: */*
Accept-Charset: utf-8
Host: www.rebol.com
User-Agent: REBOL

HTTP/1.1 200 OK
Date: Wed, 09 Jan 2013 09:03:18 GMT
Server: Apache
Last-Modified: Sat, 15 Dec 2012 07:02:21 GMT
Accept-Ranges: bytes
Content-Type: text/html
Via: 1.1 BC5-ACLD
Content-Length: 7407
Connection: close
GrahamC:
9-Jan-2013
>> write http://www.rebol.com/index.html[ HEAD ]
make object! [
    name: none
    size: none
    date: none
    type: 'file
    response-line: "HTTP/1.1 200 OK"
    response-parsed: none
    headers: make object! [
        Content-Length: "7407"
        Transfer-Encoding: none
        Last-Modified: "Sat, 15 Dec 2012 07:02:21 GMT"
        Date: "Wed, 09 Jan 2013 09:24:53 GMT"
        Server: "Apache"
        Accept-Ranges: "bytes"
        Content-Type: "text/html"
        Via: "1.1 BC5-ACLD"
        Connection: "close"
    ]
]

world-name: r3wp

Group: All ... except covered in other channels [web-public]
Pekr:
7-Jan-2005
well, I understand how rigid things as Uniserve works - multiplexing 
engine, various protocols/services and handlers installed .. so you 
can run http server, irc client, messenger client etc., dynamically. 
 I don't understand, how Chord would be usefull in such case for 
e.g.
Group: !AltME ... Discussion about AltME [web-public]
Colin:
8-Feb-2006
I used to run altme all the time at work until they clamped down 
on all firewall and proxy ports. I found it to be the ideal program 
to log progress on tasks I was doing but now it wont connect. I only 
need it to do the do name or world resolution as the server would 
be running inside the firewall too. No data traffic needs to flow 
outside the firewall. Reichart - is it possible to have a local name 
world name server our enable the name resolution to be proxied through 
http, and I could just plug in the corporate gateway/proxy?
Colin:
9-Feb-2006
Guess not. What I want to be able to do is start a world inside the 
firewall and then only have clients inside it connect. The clients 
would need to know how to resolve the world name and IP address thru 
some mechanism that doesnt require going out of the firewall to do 
so or allow the name resolution and server declaration protocols 
be proxied through http. I think that should pass through most corporate 
firewalls.
[unknown: 9]:
9-Feb-2006
We agree teh HTTP part is a possible solve (something we are looking 
at).  But the other way around, allowing no name server offered by 
us means instant piracy at the very level where the only market that 
pays would do so.  No?
Group: RAMBO ... The REBOL bug and enhancement database [web-public]
Rondon:
11-Oct-2005
I think that the http scheme the temporary redirection .. server 
error 307 is not at the rebol http_scheme.. the 302 is.. but not 
the 307..
Graham:
5-Feb-2006
>> q: query http://www.rebol.com/index.html
== none
>> read http://www.rebol.com/
== {<html>
<head>

<META NAME="Description" CONTENT="Lightweight distributed computing, 
collaboration, and programming systems for t...

>> q: query http://www.rebol.com/asdfsa.r

** User Error: Error.  Target url: http://www.rebol.com/asdfsa.r
could not be retrieved.  Server response: HTTP/1.0
404 Not Found
** Near: q: query http://www.rebol.com/asdfsa.r
>> read http://www.rebol.com/
== ""
Ladislav:
11-Jan-2007
hi, did anybody notice, that sometimes

    a-value: make port! http://

works, while sometimes is end up as follows:

** User Error: No network server for HTTP is specified
** Near: a-value: make port! http://
Anton:
21-May-2007
Ok, so let me restate the situation:

Due to a buggy foreign server, we are patching our HTTP scheme, which 
declares itself as HTTP1.0, with a part from HTTP1.1.
(I just want to clarify that HTTP 1.0 does not contain 303.)
Group: Core ... Discuss core issues [web-public]
Micha:
5-Jun-2005
how to write server  tunnel : client - socks - http proxy - server 
?
Maxim:
27-Oct-2006
I'm using it myself for http operations on a server.  and it works 
flawlessly.
Pekr:
15-Jan-2007
but it will be interesting comparison too - for apache, there is 
some "standard" testing tool done in perl, measuring its performance. 
We should try two models and compare - having rebol http server, 
first using non-blocking io multiplexing, one task, second generating 
new thread for each connection - measure response, amount of memory 
consumed etc ....
Graham:
13-Apr-2007
>> exists? http://www.aving.co.kr/newproduct/default.asp?p1=newproduct&mode=read&table_id=English&num=79

URL Parse: none none www.aving.co.kr none newproduct/ default.asp?p1=newproduct&mode=read&table_id=English&num=79
Net-log: ["Opening" "tcp" "for" "HTTP"]
connecting to: www.aving.co.kr

Net-log: {HEAD /newproduct/default.asp?p1=newproduct&mode=read&table_id=English&num=79 
HTTP/1.0
Accept: */*
Connection: close
User-Agent: REBOL View 1.3.2.3.1
Host: www.aving.co.kr
}
Net-log: "HTTP/1.1 500 Internal Server Error"
== false
>>
Oldes:
13-Apr-2007
using trace/net - Net-log: "HTTP/1.1 500 Internal Server Error" that's 
what the page returns
Terry:
19-Apr-2007
Hey, I'm playing around with the 'tiny web server' and it has this 
function.. 

send-page: func [data mime] [

        insert data rejoin ["HTTP/1.0 200 OK^/Content-type: " mime "^/^/"]
        write-io http-port data length? data
    ] 

now.. when i use it like this.. 
	send-page "test" mime
.. it works fine.. but not this.. 
	out: "test"
	send-page out mime

What's up wit 'dat?
Maxim:
19-May-2009
this is easy to figure out using firebug  ;-)


redirect the html page to a server you have cheyenne running and 
save out the whole http request, you will have url and post data 
:-)
Janko:
30-Jun-2009
I was nagging you about the actors+message passing rebol lib I was 
playing with..  Now I have a real thing running with it .. I will 
post source code on blog soon. It's not that exciting video .. just 
some text changing :) but I hope it will help in getting a picture 
when I post the code.


On left is a Linux server with work dispatcher on  right are two 
workers on windows. There can be as many workers on many computers 
or none and workers can drop out at any time without work being undone/"halfdone". 


It uses message passing and actors for everything.. and comunication 
works like at tuple spaces so you get autobalancing. It's not something 
that special, you could do something roughly the same with http server 
app probably, although it would be a little more messy.
Graham:
8-Aug-2009
This is one of these annoying issues that should be "fixed" with 
the http protocol.

>> read http://remr.s3.amazonaws.com/20090806.7z
connecting to: remr.s3.amazonaws.com

** User Error: Error.  Target url: http://remr.s3.amazonaws.com/20090806.7z
could not be retrieved.  Server response: HTTP/1.0 403 Forb
Graham:
8-Aug-2009
But if I do a wireshark trace, I see this

GET /20090806.7z HTTP/1.0
Accept: */*
Connection: close
User-Agent: REBOL View 2.7.6.3.1
Host: remr.s3.amazonaws.com

HTTP/1.0 403 Forbidden
Date: Sat, 08 Aug 2009 21:08:07 GMT
Content-Type: application/xml
x-amz-request-id: D03B3FA12CC875D5

x-amz-id-2: u3b7TkPzJc5NBwvov4HRQuMsCsosD7le9xfRMSGiCN2BXgeae6kKMVQAbhzqRDwY
Server: AmazonS3
Via: 1.1 nc1 (NetCache NetApp/6.0.5P1)

<?xml version="1.0" encoding="UTF-8"?>

<Error><Code>AccessDenied</Code><Message>Access Denied</Message><RequestId>D03B3FA12CC875D5</RequestId><HostId>u3b7TkPzJc5NBwvov4HRQuMsCsosD7le9xfRMSGiCN2BXgeae6kKMVQAbhzqRDwY</HostId></Error>
Graham:
9-Aug-2009
this is http 1.0 http://www.w3.org/Protocols/HTTP/1.0/spec.html#Code403

403 Forbidden


The server understood the request, but is refusing to fulfill it. 
Authorization will not help and the request should not be repeated. 
If the request method was not HEAD and the server wishes to make 
public why the request has not been fulfilled, it should describe 
the reason for the refusal in the entity body. This status code is 
commonly used when the server does not wish to reveal exactly why 
the request has been refused, or when no other response is applicable.
Graham:
10-Aug-2009
http://code.google.com/apis/accounts/docs/AuthForInstalledApps.html#AuthProcess


At the bottom of this page, the Google authentication API can provide 
a 403 response as this example below

HTTP/1.0 403 Access Forbidden
Server: GFE/1.3
Content-Type: text/plain
	
Url=http://www.google.com/login/captcha
Error=CaptchaRequired
CaptchaToken=DQAAAGgA...dkI1LK9

CaptchaUrl=Captcha?ctoken=HiteT4b0Bk5Xg18_AcVoP6-yFkHPibe7O9EqxeiI7lUSN
Graham:
9-Dec-2009
Yes, I use hylafax which runs on linux .. but a windows client just 
has to do a http post of the file to the hylafax server
Group: Script Library ... REBOL.org: Script library and Mailing list archive [web-public]
Maxim:
10-Jul-2009
here is an error I got trying to go to the http-tools.r script...

Not Found


The requested URL /cgi-bin/cgiwrap/rebol/view-script.r was not found 
on this server.


Additionally, a 404 Not Found error was encountered while trying 
to use an ErrorDocument to handle the request.
Apache Server at www.rebol.org Port 80
Group: View ... discuss view related issues [web-public]
Anton:
6-Sep-2005
connecting to: 66.136.133.209

** User Error: Error.  Target url: http://66.136.133.209/could not 
be retrieved.  Server response: HTTP/1.0 401 Unauthorized
** Near: cont: read http://66.136.133.209


Firefox: {Enter username and password for "level_15_or_view_access" 
at http://66.136.133.209}
(a security requester prompting for username and password).
Luca:
4-Nov-2005
Actually the 401 error (Unauthorized) and the HTTP Authentication 
are mentioned in the RFC 2616 - Hypertext Transfer Protocol. So maybe 
the HTTP should manage it, and it actually manages ithem a call to 
http://user:[pass-:-server] works fine: However, in my opinion, would 
be very useful if /View would manage user/pass when it access authorization 
required urls.
Henrik:
18-Oct-2006
>> probe disarm try [load http://www.lexicon.net/antonr/rebol/patch/ctx-text-next-field-patch.r]
connecting to: www.lexicon.net
make object! [
    code: 800
    type: 'user
    id: 'message

    arg1: {Error.  Target url: http://www.lexicon.net/antonr/rebol/patch/ctx-text-next-field-patch.r
    could not be retrieved.  Server response: HTTP/1.1 404 Not Found}
    arg2: none
    arg3: none

    near: [load http://www.lexicon.net/antonr/rebol/patch/ctx-text-next-field-patch.r]
    where: none
]

just tested 10 seconds ago
Group: I'm new ... Ask any question, and a helpful person will try to answer. [web-public]
jack-ort:
2-Jul-2010
Hello - hope someone can find the newbie mistake I'm making here. 
 Wanted to use REBOL to tackle a need to get data from Salesforce 
using their SOAP API.  New to SOAP, WSDL and Salesforce, but using 
SoapUI mananged to do this POST (edited only to hide personal info):

POST https://login.salesforce.com/services/Soap/u/19.0HTTP/1.1
Accept-Encoding: gzip,deflate
Content-Type: text/xml;charset=UTF-8
SOAPAction: ""
User-Agent: Jakarta Commons-HttpClient/3.1
Host: login.salesforce.com
Content-Length: 525


<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:urn="urn:partner.soap.sforce.com">
   <soapenv:Header>
      <urn:CallOptions>
         <urn:client></urn:client>
         <urn:defaultNamespace></urn:defaultNamespace>
      </urn:CallOptions>
   </soapenv:Header>
   <soapenv:Body>
      <urn:login>
         <urn:username>[jort-:-xxxxxxxxxxxxx-:-com]</urn:username>

         <urn:password>xxxxxxxxxx78l6g7iFac5uaviDnJLFxxxxx</urn:password>
      </urn:login>
   </soapenv:Body>
</soapenv:Envelope>

and get the desired response:

HTTP/1.1 200 OK
Server: 
Content-Encoding: gzip
Content-Type: text/xml; charset=utf-8
Content-Length: 736
Date: Fri, 02 Jul 2010 20:32:14 GMT


<?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns="urn:partner.soap.sforce.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Body><loginResponse> 
......

Then using SoapUI I am able to send a successful Logout message.


Using REBOL 2.7.7.3.1, I created an "upload" string containing the 
POST block above without the "POST " at the beginning, set my url 
to:

>> url
== https://login.salesforce.com/services/Soap/u/19.0

and tried this:

>> response: read/custom url reduce ['POST upload]

but consistently get a Server 500 error:


** User Error: Error.  Target url: https://login.salesforce.com:443/services/Soap/u/19.0 
could not be retrieved.  Se
rver response: HTTP...
** Near: response: read/custom url reduce ['POST upload]

For completeness, here's the upload value:

>> print mold upload
{https://login.salesforce.com/services/Soap/u/19.0HTTP/1.1
Accept-Encoding: gzip,deflate
Content-Type: text/xml;charset=UTF-8
SOAPAction: ""
User-Agent: Jakarta Commons-HttpClient/3.1
Host: login.salesforce.com
Content-Length: 525


<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:urn="urn:partner.soap.sforce.com">

   <soapenv:Header>
      <urn:CallOptions>
         <urn:client></urn:client>
         <urn:defaultNamespace></urn:defaultNamespace>
      </urn:CallOptions>
   </soapenv:Header>
   <soapenv:Body>
      <urn:login>
         <urn:username>[jort-:-researchpoint-:-com]</urn:username>

         <urn:password>metrics12378l6g7iFac5uaviDnJLFVprDl</urn:password>
      </urn:login>
   </soapenv:Body>
</soapenv:Envelope>}

Would appreciate any help you can give!
Group: Linux ... [web-public] group for linux REBOL users
Janko:
27-Sep-2009
setup file is like this: 
#!/bin/bash
#
# iptables example configuration script 
#
# Let's not lock ourselves out of the server
#
 iptables -P INPUT ACCEPT
#
# Flush all current rules from iptables
#
 iptables -F
#
# Allow SSH connections on tcp port 22

# This is essential when working on remote servers via SSH to prevent 
locking yourself out of the system
#
 iptables -A INPUT -p tcp --dport 22 -j ACCEPT
#
# Allow HTTP connections on tcp port 80
#
 iptables -A INPUT -p tcp --dport 80 -j ACCEPT
 iptables -A INPUT -p tcp --dport 443 -j ACCEPT
#
# Set default policies for INPUT, FORWARD and OUTPUT chains
#
 iptables -P INPUT DROP
 iptables -P FORWARD DROP
 iptables -P OUTPUT ACCEPT
#
# Set access for localhost
#
 iptables -A INPUT -i lo -j ACCEPT
#
# Accept packets belonging to established and related connections
#
 iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
#
# Save settings
#
 /sbin/service iptables save
#
# List rules
#
 iptables -L -v
Group: CGI ... web server issues [web-public]
RebolJohn:
18-May-2005
HELP w/ web rebol associations AND Rebol-View.
Here is the story..


On my PC, I have View pointing to an index.r file on my web server.
Everything is cool.

When I open up Rebol-View and traverse to my index.r on the server..
it works.


Now on the same server, I change the IIS-Web associations so that 
I can do rebol CGI.
I create a 'main.r' in some virtual directory on the server.
Web-ing to this http.//myserver/mydir/main.r   works GREAT!
CGI is working.


However, when I now open up Rebol-View on my local PC and traverse 
to my index.r which is
on the server.. I get an error.


The problem is that before.. rebol-view was requesting a file-download 
and the server sends it.

Now since IIS is doing '*.r' CGI, when rebol-view requests for the 
index.r download.. the server is processing the request
and attempting to send back html.. not a rebol file.


Is there any way of fixing this other than..

* changing the CGI association from '*.r' to something else  (ie. 
'*.rr')

* changing all my view-apps on the server from '*.r' to something 
else   (ie. '*.rr')
??
François:
25-Jul-2005
With Apache 2.x (normal CGI), we have: make object! [ 
	server-software: "Apache/2.0.54 (Fedora)" 
	server-name: "localhost" 
	gateway-interface: "CGI/1.1" 
	server-protocol: "HTTP/1.1" 
	server-port: "80" 
	request-method: "GET" 
	path-info: "/sample01.rhtml" 
	path-translated: "/var/www/html/sample01.rhtml" 
	script-name: "/cgi-bin/magic.cgi" 
	query-string: "" 
	remote-host: none 
	remote-addr: "127.0.0.1" 
	auth-type: none 
	remote-user: none 
	remote-ident: none 
	Content-Type: none 
	content-length: none 
	other-headers: [
		"HTTP_HOST" "localhost" 

  "HTTP_USER_AGENT" {Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.10) 
  Gecko/20050720 Fedora/1.0.6-1.1.fc4 Firefox/1.0.6} 

  "HTTP_ACCEPT" {text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5} 
		"HTTP_ACCEPT_LANGUAGE" "en-us,en;q=0.5" 
		"HTTP_ACCEPT_ENCODING" "gzip,deflate" 
		"HTTP_ACCEPT_CHARSET" "ISO-8859-1,utf-8;q=0.7,*;q=0.7" 
		"HTTP_KEEP_ALIVE" "300" 
		"HTTP_CONNECTION" "keep-alive" 
		"HTTP_COOKIE" "PHPSESSID=7f84fd7766f23e1462fed550ecbbfda4"
	] 
]
Graham:
26-Jul-2007
I don't know if it helps, but I did write a web server stress test 
that did a http upload of hundreds of images in Rebol that year.. 
but the scripts are long lost.
Group: Web ... Everything web development related [web-public]
Graham:
25-Feb-2005
'http-head should probably parse out the port for the web server 
and if  it is not there, only then default to 80
Geomol:
29-Mar-2005
I have a problem with HTTPS over a proxy. I'm using REBOL/Command 
2.5.6.3.1, that came with our SDK. This version first need the HTTPS 
protocol to be activated using this code:


net-utils/net-install HTTPS make system/schemes/http/handler [] 443

system/schemes/https: make system/schemes/https [user-agent: reform 
["REBOL" system/product system/version]]

I activated trace by typing: trace/net on

Our proxy is set up ok, as I can read the internet with a browser 
using it (both HTTP and HTTPS).
Now if I in REBOL do this:

>> s: read https://webservices.rki.dk

I get:

URL Parse: none none webservices.rki.dk none none none
Net-log: ["Opening" "ssl" "for" "HTTPS"]
connecting to: webservices.rki.dk
Net-log: {CONNECT webservices.rki.dk:443 HTTP/1.1
Host: webservices.rki.dk:443

}
Net-log: "HTTP/1.0 200 Connection established"
Net-log: {GET https://webservices.rki.dk:443/ HTTP/1.0
Accept: */*
Connection: close
User-Agent: REBOL Command 2.5.6.3.1
Host: webservices.rki.dk:443
}
Net-log: none

** User Error: Error.  Target url: https://webservices.rki.dk:443/ 
could not be
retrieved.  Server response: none
** Near: s: read https://webservices.rki.dk
Geomol:
30-Mar-2005
Graham: I've done Ethereal monitoring with our test proxy, and after 
the "HTTP/1.0 200 Connection established" reply from the proxy, there's 
a line from my computer (running REBOL) to the proxy with the text 
"Continuation or non-HTTP traffic". After that, the proxy reply with 
a [FIN, ACK]. If that "continuation" holds the information from my 
REBOL application to go to the server in the other end, it may be 
a proxy problem!?
amacleod:
11-Feb-2009
I'm using dyndns as I have a dynamic ip. 

If i type my url into the browser from a macine outside my local 
network I get my web page. If I do it from within my local network 
(even on a different machine) I can't not get through to the page 
"Cannot display webpage" error.

It's not just http. I'm accessing a mysql server too with the same 
problem resulting. 

I know I can use "localhost but I would need to change my code everytime 
I'm using it locally.
Group: Announce ... Announcements only - use Ann-reply to chat [web-public]
Guest:
19-Apr-2005
Try this application to test Webservices: to spy and test HTTP protocols, 
or to test a site (client or server part): go at http://dev.fr/view.php?sid=164
Henrik:
28-Sep-2006
HTTP Tools. A small script containing a few functions to read the 
HTTP header of a webserver. It doesn't do much, but the main purpose 
is to determine which scripting language is used on a specific webserver. 
I use it to upload ASP and PHP scripts to various webservers, without 
having the user needing to know the scripting language in advance. 
It's not very strong yet and some servers will not reveal this information, 
but I hope it can be built into a reliable tool for determining scriping 
language over time.

http://hmkdesign.dk/rebol/http-tools/http-tools.r

Example:

>> server-type http://rebol.com
== "Apache"
>> x-power-type http://www.hmkdesign.dk
== "php"
>> x-power-type http://www.microsoft.com
== "asp"
Group: !Uniserve ... Creating Uniserve processes [web-public]
Graham:
17-May-2005
My webmail using Uniserve's http server (Cheyenne) does database 
connections to retrieve mail http://www.compkarori.co.nz:8001
Terry:
4-Feb-2006
But if that's what it takes to have a single server handling everything 
from POP to HTTP to direct TCP, then so be it.
Dockimbel:
29-Jan-2010
I've heard of Mongrel server. What's special with its http parser?
Janko:
29-Jan-2010
mongrel is a server for ruby .. but it has a open sourced http parser 
that is written in "ragel" which is engine that makes some fast and 
lightweigh C code out of state machine specification. it's known 
as to be very fast and very robust because of that ( I listened too 
much online video talks in my life ) ... I will try to find some 
links
Janko:
29-Jan-2010
Yes, surely parse can do it... I am just debating .. I am not sure 
if mongrell is really that awesome.


I was thinking that speedwise the upper bound of the http server 
is determined by socket handling and http parsing probably? Meaning 
that even if you have everything in ram and prepared you can't serve 
more thatn that. Cheyenne has a *very* high upper bound for a dynamic 
language (I was many times expressing my surprise and getting 250 
req/s was the reason I returned back to rebol with doing all webapps 
in it now).
Group: DevCon2005 ... DevCon 2005 [web-public]
Gabriele:
4-Oct-2005
phil: you can also wait for when the file will be completely up on 
my server and then download via HTTP (though torrent would save a 
bit of my bw, thus is preferred whenever possible)
Gabriele:
6-Oct-2005
at times when there are no seeds around, just use http to download. 
that will always work :) of course the torrent is preferred when 
there are many seeds (faster, less bw used on my server).
Group: Rebol School ... Rebol School [web-public]
james_nak:
30-Oct-2007
Here is something from the rebservices section from Gabriele:

client has experimental generic http proxy support; server has the 
new, much improved file service. see http://www.rebol.net/rs/demos/file-client.r
for example usage to transfer big files.
Group: Rebol/Flash dialect ... content related to Rebol/Flash dialect [web-public]
Robert:
14-Sep-2008
Cool. So, I could use Flash & AS without any visual flash sutff just 
to open a non-http channel to a server and get answers back into 
the Browser?
Group: !REBOL3-OLD1 ... [web-public]
shadwolf:
22-Jul-2008
but  achieving a web browser is more than only connect to a http 
server retrive and renders HTTP once again that way to think was 
OK in years 90  but not in years 2008 ...  Yes most of what do a 
webbrowser is to rederised HTML  page but what about the video streaming 
or animated interfaces (what flash is ablem to bring to a  webbrowser 
and make the 2008 web sites so hum dynamic)
Henrik:
22-Jul-2008
a stronger link betwin 

networking" and "visual" modules ??? hum that's like if Carl was 
preteneding we can't already do that !!??"


I haven't mentioned this, because I was afraid I would get it wrong 
and Carl would bash me for it. :-) What I'm writing here below is 
one of the reasons to switch to a webbrowser mentality. It was also 
one of the the reasons for dumping VID3.


Webbrowser mentality helps building infrastructure, very quickly. 
There is allegedly a stronger link now between VID and networking 
in the same way as there is a link between HTML and HTTP. When you 
create a link in a webpage, it takes only a few tags in one line 
of code (even inline) to do that. You don't do anything else but 
provide the link. The browser takes care of the rest, and you can 
build an entire infrastructure with hyperlinks. You don't have to 
worry about TCP ports or wait for acknowledge from the server. The 
basic philosophy that goes behind hyperlinking is its extreme simplicity, 
which is why it's so widespread. It's easy to grasp and easy to code.

When you for example write in a forum, you are often capable of providing 
hyperlinks. As a result, hyperlinking is available to any users, 
who have just the basic knowledge of coding, which to them is "typing 
funny chars to make a link".

Carl wants the same thing in VID3.4, where you must currently work 
with ports, store things in words and do something with the words 
in order to get where you need to go. You need to do some programming 
and make complex decisions. That level of detail must not go away 
of course, but there is a simplifying element that's missing, and 
that is to use buttons directly as hyperlinks. If successful, anyone 
could code simple VID GUIs.


I'm still sure I'm getting it a bit wrong, so there's not much point 
discussing it right now. He emphasized very strongly about building 
infrastructure through very simple methods that most people can understand 
and use. He talked about this more than about VID itself.
AdrianS:
15-Apr-2009
Petr, chunked transfer mode is useful when an HTTP response is returned 
and the content length is unknown (for example, it is being dynamically 
generated from a source which is streaming it out). It can also exist 
when an HTTP response is being handled by intermediate proxies that 
could, for example, compress the response for a part of the path 
to the client. I've seen this on a cell phone where a POST was made 
with a fixed content length, but the web server received the request 
as chunked, with no length.
BrianH:
22-May-2009
Try it again - the server may have been busy. The HTTP scheme isn't 
as good as one would like yet.
BrianH:
3-Jun-2009
The HTTP scheme currently doesn't handle network errors very well 
- that includes server issues.
Will:
15-Jun-2009
Here is a great example code using GrandCentral: "DispatchWebServer"

from the description: "A web server that uses one queue per HTTP 
connection. Supports HTTP pipelining and on-the-fly compression. 
Also shows use of dispatch-style signal and vnode event handling."

https://developer.apple.com/snowleopard/library/samplecode/DispatchWebServer/index.html
(ADC account needed)
Whoever is doing R3 on OS X, should have a look 8-)
RobertS:
17-Jul-2009
when we don't find a word in a slot, we fail;  my question is COULD 
we tolerate an unset! where a word! is now expected ... the Rebol 
path! type is just too useful to ignore here ...  and our use of 
the character '/' does have "something" to do with our natural interpretaion 
of file and url - files assume valid hierarchy depth at time of tracversal, 
a web server need not ...  at the moment we have no type corresponding 
to what follows an HTTP schema and domain other than string .... 
or am I mistaken?
BrianH:
17-Jul-2009
The problem is that an http server has the option to provite a directory 
of their resources, but there is no generally agreed-on machine readable 
format for providing such a directory, and the human readable format 
(a Site Map), isn't implemented on most sites. If the site you are 
interested in has a site map you can grab and parse that, or you 
can trace throuugh the links on the site and hope for the best, or 
you can make use of an external service like Google that has already 
traced through the links.
BrianH:
17-Jul-2009
For instance, there isn't anything in the HTTP or URL standards that 
say that the path is necessarily a hierarchy, though the (poor) cookie 
standards definitely imply it. Ignoring the cookie standards, you 
could easily look at it as a tag list. However, you would need to 
be writing the server app to do so, since the server is what decides 
what the path means.
RobertS:
13-Aug-2009
What is obscure about a syntax which permits literal strings to be 
literal strings?  Try assigning  set lit "{test} {" in your favorite 
Tcl interpreter.  I am not a JSON expert but [{ looks like JSON to 
me so #{[ "looks worrisome to me"   JSON or YAML or something other 
than XML is going to be important whether REBOL likes it or not. 
 Take RDF as one exmaple ( I prefer Topic Maps - please do not attack 
the example, but the isea ).  The fact that most people seem to think 
that RDF is XML does not make it so.  Tim Berners-Lee prefers some 
form of Triple notation for RDF.  Not XML.  As soon as a notation 
uses curly braces we have a problem using Curl on the server-side. 
 Please don't point to QM.  IT is not just tightly coupled to HTML 
it is married to it.  The web is not HTML it is HTTP with Content-Type: 
 set in the response header.  If that content type uses curly braces 
we have to start escaping characters in Rebol.  Awkward templating 
is dooked templating.  Let me repeat: doomed.  Folly.
Henrik:
13-Oct-2009
Note that in A87 has a problem with HTTP:

>> read http://www.rebol.net

** Access error: protocol error: "Server error: HTTP/1.1 400 Bad 
Request"


In case you are trying to do something with OSX or Linux, which currently 
only are at A87.

This is not a problem in A88.
Pavel:
27-Nov-2009
Gabriele, is it possible to dispatch multiple request to wiki TCP 
examples "pong" server listening on single port? It should be possible 
but for me second request is without response until the first still 
open. Your HTTP scheme is too much complicated to me as lecture reading 
:). I've tried to transform rebol.org webserver to R3, I've got response, 
but seems to me useles to serve one and one only connection at time 
when the port is asynchronous by nature. Any hint?
shadwolf:
2-Dec-2009
in php they do it like that 

	function getHTML($page=False)
	{
		if (!$page)
			$page = $this->path;
		$contents = "";

  $domain = (substr($this->domain, 0, 7) == "http://") ? substr($this->domain, 
  7) : $this->domain;



  if (@$fp = fsockopen($domain, $this->port, $this->errno, $this->errstr, 
  2))
		{
			fputs($fp, "GET ".$page." HTTP/1.1\r\n".

    "User-Agent: Mozilla/4.0 (compatible; MSIE 5.5; Windows 98)\r\n".
				"Accept: */*\r\n".
				"Host: ".$domain."\r\n\r\n");

			$c = 0;
			while (!feof($fp) && $c <= 20)
			{
				$contents .= fgets($fp, 4096);
				$c++;
			}

			fclose ($fp);

			$this->encodeContent($contents);

			preg_match("/(Content-Type:)(.*)/i", $contents, $matches);
			if (count($matches) > 0)
			{
				$contentType = trim($matches[2]);


    preg_match("/(meta http-equiv=\"Content-Type\" content=\"(.*); charset=(.*)\")/iU", 
    $contents, $matches);
				if (isset($matches[3]))
				{
					$this->setStreamEncoding($matches[3]);
				}
				if ($contentType == "text/html")
				{
					$this->isShoutcast = True;
					return $contents;
				}
				else
				{
					$this->isShoutcast = False;


     $htmlContent = substr($contents, 0, strpos($contents, "\r\n\r\n"));


     $dataStr = str_replace("\r", "\n", str_replace("\r\n", "\n", $contents));
					$lines = explode("\n", $dataStr);
					foreach ($lines AS $line)
					{
						if ($dp = strpos($line, ":"))
						{
							$key = substr($line, 0, $dp);
							$value = trim(substr($line, ($dp+1)));
							if (preg_match("/genre/i", $key))
								$this->nonShoutcastData['Stream Genre'] = $value;
							if (preg_match("/name/i", $key))
								$this->nonShoutcastData['Stream Title'] = $value;
							if (preg_match("/url/i", $key))
								$this->nonShoutcastData['Stream URL'] = $value;
							if (preg_match("/content-type/i", $key))
								$this->nonShoutcastData['Content Type'] = $value;
							if (preg_match("/icy-br/i", $key))

        $this->nonShoutcastData['Stream Status'] = "Stream is up at ".$value."kbps";
							if (preg_match("/icy-notice2/i", $key))
							{

        $this->nonShoutcastData['Server Status'] = "This is <span style=\"color: 
        red;\">not</span> a Shoutcast server!";
								if (preg_match("/ultravox/i", $value))

         $this->nonShoutcastData['Server Status'] .= " But an <a href=\"http://ultravox.aol.com/\" 
         target=\"_blank\">Ultravox</a> Server";
								$this->altServer = $value;
							}
						}
					}
					return nl2br($htmlContent);
				}
			}
			else
				return $contents;
		}
		else
		{
			return False;
		}
	}
BrianH:
11-Jan-2010
Oh wait, that happened to me too. The http scheme doesn't handle 
server errors well, and the internet has been getting increasingly 
crappy lately. That's why I've been looking over the scheme lately.
Group: Plugin-2 ... Browser Plugins [web-public]
JoshM:
4-Jul-2006
You would have only the capability of HTTP and FTP requests via Proxy, 
we're not talking about proxy-enabling the whole network stack. I'm 
not sure that makes sense anyway (i.e. if the cache server serves 
you a cached page, you're not going to communicate with the actual 
server anyway).....
Maxim:
6-Feb-2007
but so far I am getting no results... and unless someone steps in 
to explain to me how I can write stuff out (read as gives me an example 
snippets which works on their machine)... I won't continue trying.... 
I've got other things to tackle first...


and obviously in normal web dev, the server is the file store, so 
you'd speak to it using http get and post... so as long as you have 
access to adding hooks on the server too, you can work out a virtual 
disk system through your web server... more safe too.
Group: !Cheyenne ... Discussions about the Cheyenne Web Server [web-public]
Dockimbel:
11-Oct-2006
It connect to a server application, like php-fastcgi or a REBOL FastCGI 
server built with /Command, or any other server accepting FastCGI 
clients. Then it sends the HTTP request and wait for a response back.
Maxim:
22-Feb-2007
I did so for my own server, which is an http web service:
Pekr:
29-May-2007
So RSP and sessions are already working? That's cool! Top quality 
http server which does not need to be installed!
btiffin:
2-Jun-2007
It's not a short paste...
[HTTPd] ================== NEW REQUEST ==================

                                                         [HTTPd] Request Line=>GET /testapp/ HTTP/1.1

                                                                                                     [HTTPd] Request Headers=>
Host: localhost:8080

User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.3) Gecko/20070310 
Iceweasel/2.0.0.3 (Debian-2.0.0.3-1)

Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive


[HTTPd] Phase url-to-filename done ( mod-alias )

                                                [HTTPd] Phase url-to-filename done ( mod-rsp )

                                                                                              [HTTPd] Phase url-to-filename done ( mod-fastcgi )
   [HTTPd] Phase url-to-filename done ( mod-static )

                                                    [HTTPd] Phase access-check done ( mod-action )

                                                                                                  [HTTPd] Phase set-mime-type done ( mod-action )
    [HTTPd] Phase make-response done ( mod-rsp )

                                                [HTTPd] Response=>

                                                                  HTTP/1.1 302 Moved Temporarily
Server: Cheyenne/0.9.11
Connection: close
Location: /testapp/login.rsp


[HTTPd] Phase logging done ( mod-static )

                                         [HTTPd] Phase clean-up done ( mod-rsp )

                                                                                [HTTPd] Connection closed

[HTTPd] ================== NEW REQUEST ==================        
                                        /

                                                         [HTTPd] Request Line=>GET /testapp/login.rsp HTTP/1.1

                                                                                                              [HTTPd] Request Headers=>
Host: localhost:8080

User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.3) Gecko/20070310 
Iceweasel/2.0.0.3 (Debian-2.0.0.3-1)

Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive


[HTTPd] Phase url-to-filename done ( mod-alias )

                                                [HTTPd] Phase url-to-filename done ( mod-rsp )

                                                                                              [HTTPd] Phase url-to-filename done ( mod-fastcgi )
   [HTTPd] Phase url-to-filename done ( mod-static )

                                                    [HTTPd] Phase access-check done ( mod-action )

                                                                                                  [HTTPd] Phase set-mime-type done ( mod-action )
    [HTTPd] Phase make-response done ( mod-rsp )
[HTTPd] Response=>
                  HTTP/1.1 200 OK
Server: Cheyenne/0.9.11
Content-Length: 482
Content-Type: text/html
Connection: Keep-Alive

Set-Cookie: RSPSID=EISPOMAZTPDFKVIWJAFONZDE; expires=Sat, 02 Jun 
2007 11:54:30 GMT; path=/testapp; HttpOnly
Pragma: no-cache
Cache-Control: no-cache, must-revalidate
Expires: Thu, 01 Dec 1994 16:00:00 GMT


[HTTPd] Phase logging done ( mod-static )

                                         [HTTPd] Phase clean-up done ( mod-rsp )

                                                                                [HTTPd] Phase task-done done ( mod-rsp )

[HTTPd] ================== NEW REQUEST ==================        
                                                       \

                                                         [HTTPd] Request Line=>POST /testapp/login.rsp HTTP/1.1

                                                                                                               [HTTPd] Request Headers=>
Host: localhost:8080

User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.3) Gecko/20070310 
Iceweasel/2.0.0.3 (Debian-2.0.0.3-1)

Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
Referer: http://localhost:8080/testapp/login.rsp
Content-Type: application/x-www-form-urlencoded
Content-Length: 23


[HTTPd] Phase url-to-filename done ( mod-alias )

                                                [HTTPd] Phase url-to-filename done ( mod-rsp )

                                                                                              [HTTPd] Phase url-to-filename done ( mod-fastcgi )
   [HTTPd] Phase url-to-filename done ( mod-static )

                                                    [HTTPd] Posted data=>login=test&pass=letmein

                                                                                                [HTTPd] Phase access-check done ( mod-action )
 [HTTPd] Phase set-mime-type done ( mod-action )

                                                [HTTPd] Phase make-response done ( mod-rsp )
[HTTPd] Response=>
                  HTTP/1.1 301 Moved Permanently
Server: Cheyenne/0.9.11
Connection: close
Location: /testapp/

Set-Cookie: RSPSID=YDADUIONKJPHLFBWEDZDFCXN; expires=Sat, 02 Jun 
2007 11:54:37 GMT; path=/testapp; HttpOnly


[HTTPd] Phase logging done ( mod-static )

                                         [HTTPd] Phase clean-up done ( mod-rsp )

                                                                                [HTTPd] Phase task-done done ( mod-rsp )

                                                                                                                        [HTTPd] Connection closed
    [HTTPd] ================== NEW REQUEST ==================

                                                             [HTTPd] Request Line=>GET /testapp/ HTTP/1.1

                                                                                                         [HTTPd] Request Headers=>
Host: localhost:8080

User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.3) Gecko/20070310 
Iceweasel/2.0.0.3 (Debian-2.0.0.3-1)

Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
Referer: http://localhost:8080/testapp/login.rsp


[HTTPd] Phase url-to-filename done ( mod-alias )

                                                [HTTPd] Phase url-to-filename done ( mod-rsp )

                                                                                              [HTTPd] Phase url-to-filename done ( mod-fastcgi )
   [HTTPd] Phase url-to-filename done ( mod-static )

                                                    [HTTPd] Phase access-check done ( mod-action )

                                                                                                  [HTTPd] Phase set-mime-type done ( mod-action )
    [HTTPd] Phase make-response done ( mod-rsp )

                                                [HTTPd] Response=>

                                                                  HTTP/1.1 302 Moved Temporarily
Server: Cheyenne/0.9.11
Connection: close
Location: /testapp/login.rsp


[HTTPd] Phase logging done ( mod-static )

                                         [HTTPd] Phase clean-up done ( mod-rsp )

                                                                                [HTTPd] Connection closed

                                                                                                         [HTTPd] ================== NEW REQUEST ==================

                     [HTTPd] Request Line=>GET /testapp/login.rsp HTTP/1.1

                                                                          [HTTPd] Request Headers=>
Host: localhost:8080

User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.3) Gecko/20070310 
Iceweasel/2.0.0.3 (Debian-2.0.0.3-1)

Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
Referer: http://localhost:8080/testapp/login.rsp


[HTTPd] Phase url-to-filename done ( mod-alias )

                                                [HTTPd] Phase url-to-filename done ( mod-rsp )

                                                                                              [HTTPd] Phase url-to-filename done ( mod-fastcgi )
   [HTTPd] Phase url-to-filename done ( mod-static )

                                                    [HTTPd] Phase access-check done ( mod-action )

                                                                                                  [HTTPd] Phase set-mime-type done ( mod-action )
    [HTTPd] Phase make-response done ( mod-rsp )

                                                [HTTPd] Response=>

                                                                  HTTP/1.1 200 OK
Server: Cheyenne/0.9.11
Content-Length: 482
Content-Type: text/html
Connection: Keep-Alive

Set-Cookie: RSPSID=RTJSUKAVYBNOLCJCJBSTNUHP; expires=Sat, 02 Jun 
2007 11:54:37 GMT; path=/testapp; HttpOnly
Pragma: no-cache
Cache-Control: no-cache, must-revalidate
Expires: Thu, 01 Dec 1994 16:00:00 GMT


[HTTPd] Phase logging done ( mod-static )

                                         [HTTPd] Phase clean-up done ( mod-rsp )

                                                                                [HTTPd] Phase task-done done ( mod-rsp )
btiffin:
2-Jun-2007
Output is
>> do %raw.r
Script: "Untitled" (none)
HTTP/1.1 301 Moved Permanently
Server: Cheyenne/0.9.11
Content-Length: 1625
Content-Type: text/html
Connection: close
Location: show.rsp

Set-Cookie: RSPSID=IOERCVPFSDASSCXECGDFCTFG; expires=Sat, 02 Jun 
2007 19:54:16 GMT

<html>
<head>
    <title> Manual Sessions</title>
</head>
<body>
<img src="logo.png">
<center>
<h2>Manual session mode</h2>

SESSION is an object of value:
   content         none!     none
   timeout         none!     none
   events          none!     none
   id              none!     none
   active?         logic!    false
   init?           logic!    false
   add             function! [name [word!] value /local pos]
   remove          function! [name [word!]]
   exists?         function! [name [word!]]
   start           function! []
   reset           function! []
   end             function! []

REQUEST is an object of value:
   content         block!    length: 0
   headers         block!    length: 6
   method          word!     GET
   posted          none!     none
   client-ip       tuple!    192.168.1.102
   server-port     integer!  8080
   translated      file!     %www/dev.rsp

   parsed          object!   [headers status-line method url content 
   path targe...
   config          block!    length: 4
   web-app         none!     none
   query-string    function! [/local out]

SESSION is an object of value:
   content         block!    length: 0
   timeout         none!     none
   events          none!     none
   id              none!     none
   active?         logic!    false
   init?           logic!    false
   add             function! [name [word!] value /local pos]
   remove          function! [name [word!]]
   exists?         function! [name [word!]]
   start           function! []
   reset           function! []
   end             function! []


>>
Dockimbel:
4-Jun-2007
Customizable HTTP error pages: server-side redirection on 4xx and 
5xx errors to any pages, user-defined in config file.
Dockimbel:
5-Jun-2007
A method to distinguish between SSL request (coming from stunnel) 
or normal HTTP request, is to make Cheyenne listens on 2 ports : 
80 and 443 (for example, could be any port <> 80) and configure stunnel 
to redirect the decrypted SSL traffic to port 443. Then in your RSP, 
request/server-port will tell which port was used to receive the 
request. Example :
Dockimbel:
5-Jun-2007
switch request/server-port [
	80  [...normal HTTP traffic...]
	443 [...SSL traffic...]
]
Terry:
12-Jun-2007
Hey Doc, thanks..
One thing I was trying with Uniserve years ago went like this.. 
1) A http request is received as usual. (port 80)

2) Depending on the request, Uniserve would launch a process that 
may run for hours (ie: reading a website looking for changes), and 
would occasionally send a message back to the ip address, but on 
a different port (communicates to a flash script on the original 
response page, that in turns manipulates the DOM.)


So, what's the best method to run these small scripts as to not block, 
and close without closing the server. 

I still want to serve up an HTML response, so it's a hybrid of sorts.. 
sends back a page AND runs it as a handler too?
Graham:
11-Jul-2007
This is from the Rebol cookbook 

REBOL [Title: "HTTP Post Uploader"]

    url: http://www.rebol.net/cgi-bin/test/post.r
    data: read/binary %/c/rebol/rebol.exe

    print ["Sending Size:" length? data "Checksum:" checksum data]
    result: read/custom url reduce ['post data]
    print ["Server Replied:" result]

how does Cheyenne cope with this type of post ?
Graham:
14-Jul-2007
This is with the latest beta ...

>> page: read http://127.0.0.1/show.cgi
URL Parse: none none 127.0.0.1 none none show.cgi
Net-log: ["Opening" "tcp" "for" "HTTP"]
connecting to: 127.0.0.1
Net-log: {GET /show.cgi HTTP/1.0
Accept: */*
Connection: close
User-Agent: REBOL View 1.3.2.3.1
Host: 127.0.0.1
}
Net-log: "HTTP/1.1 200 OK"
Net-log: ["low level read of " 2048 "bytes"]
Net-log: ["low level read of " 2048 "bytes"]

== {<HTML><BODY><FONT FACE='ARIAL' SIZE='-1'><a href="/">Back</a><br><br>
<B>Script path :</B> /E/cheyenne916/Cheyenne/www/ <BR><BR...

>> page: read/custom http://127.0.0.1/show.cgireduce ['post join 
"content=" url-encode content ]
URL Parse: none none 127.0.0.1 none none show.cgi
Net-log: ["Opening" "tcp" "for" "HTTP"]
connecting to: 127.0.0.1
Net-log: {POST /show.cgi HTTP/1.0
Accept: */*
Connection: close
User-Agent: REBOL View 1.3.2.3.1
Host: 127.0.0.1
Referer: http://127.0.0.1/show.cgi
Content-Type: application/x-www-form-urlencoded
Content-Length: 147479
}
Net-log: none

** User Error: Error.  Target url: http://127.0.0.1/show.cgicould 
not be retrieved.  Server response: none

** Near: page: read/custom http://127.0.0.1/show.cgireduce ['post 
join "content=" url-encode content]
>>
Graham:
2-Dec-2007
<HTML>
<HEAD>
	<TITLE>RSP Test Page</TITLE>
</HEAD>
<BODY bgcolor="white">
<a href="/">Back</a><br><br>
<FONT FACE="Arial" SIZE='-1'>
<B>Timestamp: </B><%=now %>
<BR><BR>
<H4>Request parameters :</H4>
<UL>
	<LI><B>HTTP Method: </B> <%=mold request/method%></LI>
	<LI><B>HTTP Port: </B> <%=mold request/server-port%></LI>
	<LI><B>Client IP address: </B> <%=mold request/client-ip%></LI>
</UL>
<H4>Request headers :</H4>
<UL><%
	foreach [name value] request/headers [
		print [<LI><B> name ":"</B> mold value </LI>]
	]
%></UL>
<H4>Request variables :</H4>
<UL><%
	either empty? request/content [
		print "<LI>No variable passed</LI>"
	][
		foreach [name value] request/content [
			print [<LI><B> name ":"</B> mold value </LI>]
		]
	]
%></UL>
<H4>Session :</H4>
<%either session/content [%>
<UL>
	<LI><B>SID: </B> <%=session/id%></LI><%
		either empty? session/content [
			print "<LI>No session variables</LI>"
		][
			foreach [name value] session/content [
				print [<LI><B> name ":"</B> mold value </LI>]
			]
		]
%></UL>
<%][%>
	<UL><LI>No session</LI></UL>
<%]%>

</FONT>
</BODY>
</HTML>
kcollins:
23-Aug-2008
You can run an HTTP proxy server on port 80 and run multiple instances 
of Cheyenne or other HTTP servers on other ports. The proxy server 
can route traffic to the appropriate Cheyenne instance based on configuration. 
nginx is lightweight and fast, and I have used it for this purpose, 
although my experience with it is limited. You can find more information 
here: http://en.wikipedia.org/wiki/Reverse_proxy
Dockimbel:
27-Aug-2008
If you want to know how they are handled internally in Cheyenne, 
like any other web server, the virtual domains are extracted from 
the value of HTTP "Host" header, then they are matched against the 
domains defined in the config file. If no one matches, the 'default 
domain in config file is used.
Dockimbel:
31-Jan-2009
New Cheyenne 0.9.19 beta version available for testing at : http://cheyenne-server.org/tmp/cheyenne-r0919.zip


Tested only on Windows  (my Linux image network has currently some 
issues).

ChangeLog (diff-ed from last test version) :


 o RSP: an HTTP redirection in 'on-page-start won't evaluate the page 
 script anymore.
	

 o CGI: mezz function READ-CGI now patched to be compatible with Cheyenne. 
 That's
	  the right way of reading POST data in REBOL CGI scripts.
	  
	o RSP: fixed a bug in session/add when setting a block! value.
	

 o Task-handler: fixed a network error on first packet read (high 
 load + fast hardware).
	

 o Task-handler: TCP keepalive mode activated (test workaround half-closed 
 connections).
	
	o Task-master: 
			o 'no-delay mode removed and replaced by 'keep-alive mode

   o now forks a new process as soon as one dies (not waiting for a 
   new request)

   o fix a long standing bug in queued job module name mismatching (can 
   happen under extreme load)
			o minor code cleanup
	

 o Uniserve: 'no-delay TCP network mode now switched off for all connections. 
 Fixes a

   stability issue on Vista and probably on UNIX with very high load.


 o RSP: fix a bug in 'decode-multipart when there's no file received.
	

 o UniServe: new logger service. Now all info or error logs, and debug 
 messages from

   CGI/RSP scripts are written in %trace.log. Additionnaly, you can 
   now log messages
	  using :
	  
	  		- debug/print msg 	; msg [string!]
	  		- debug/probe value 	; any mold-able value
	  		- ?? word		; works like REBOL's '?? function
	  		- ? msg		; alias for debug/print
	  

 o RSP: in debug mode, page generation time and SQL queries stats 
 now added at bottom
	  of pages.
	  
	o RSP: error in events from %app-init.r now logged.
	

 o RSP: fix a rare RSP freezing issue when an error occurs in %RSP.r 
 (for example, by
	  a user script that breaks RSP sandbox).
	  

 o RSP: sanboxing now protects from Exit/Return/Break calls made outside 
 of a
	  function context.
	  
	o RSP: %misc/rsp-init.r file removed.
	

 o RSP/CGI: New config keyword added in global sections : 'worker-libs. 
 It lists the

   librairies to load when a worker process is started. An optional 
   'on-quit section can

   be added to call cleanup code when the process quits. Examples :
	  
	  		worker-libs [
				%libs/mysql-protocols.r
				...
			]
		or	
			worker-libs [
				%libs/mysql-protocols.r
				...
				on-quit [
					%/libs/free-resources.r
				]
			]
	

 o Task-master: now you can reset all worker processes without stopping 
 Cheyenne. This

   is usefull when you need to force non-RSP/CGI files reload (helper 
   scripts, 3rd party
	  librairies,...). 
	  
	  	Usage:
	
			Windows : tray icon -> Reset Workers
		

   UNIX : kill -s USR1 <pid>	(<pid> is Cheyenne's main process ID)
	 
	 

  o Added a -w command line option to set the worker processes number. 
	 
	   	Usage:
	   
	  		$ cheyenne -w <n>		(n [integer!] : CGI/RSP process number)
	   

    Use -w 0 to help debug CGI/RSP code by resetting worker processes 
    after each request.
	   (it's like calling "Reset workers" after each request).
Robert:
19-Feb-2009
REST uses not only POST and GET but UPDATE, DELETE and INFO (IIRC) 
in HTTP requests. And I don't know if the other two need special 
treatment in the web-server or if everything is just routed to RSP 
Page and that's it.
Dockimbel:
6-Mar-2009
Everybody expects from a web server to run by default on port 80, 
that's the specification. From RFC2616 : "HTTP communication usually 
takes place over TCP/IP connections. The default port is TCP 80 but 
other ports can be used.".
Dockimbel:
8-May-2009
I'm not sure what you mean precisely by "to trap connections" and 
also "current context of the server"? Are you talking about hacking 
  the HTTP layer in Cheyenne?
BrianH:
21-May-2009
Doc, the intention is for the R3 HTTP scheme to also support http 
server use. However, the current HTTP scheme is just a placeholder 
until someone can update or rewrite it. Client use is jst what (barely) 
works in the placeholder.
Robert:
24-May-2009
Yes, I just checked the LOG files. My normal HTTP server gets:

[24/May/2009:06:01:36 -0500] "GET /rest-cart/payment?paymethod=ueberweisung 
HTTP/1.1" 200 56

Cheyenne gets:

127.0.0.1 - - [24/May/2009:12:58:33 +0200] "GET test.rsp?rest=payment?paymethod=ueberweisung 
HTTP/1.0" 200 56
Graham:
19-Aug-2009
HTTP/1.1 200 OK
Content-Type: text/html; charset=UTF-8
Date: Wed, 19 Aug 2009 07:41:04 GMT
Expires: Wed, 19 Aug 2009 07:41:04 GMT
Cache-Control: private, max-age=0
X-Content-Type-Options: nosniff
Server: GFE/2.0
Via: 1.1 bc3
Content-Length: 0
Connection: Keep-Alive
Set-Cookie: cookies here ... 

Set-Cookie: user=; Expires=Tue, 18-Aug-2009 07:41:04 GMT; Path=/; 
HttpOnly

Set-Cookie: login=; Expires=Tue, 18-Aug-2009 07:41:04 GMT; Path=/; 
HttpOnly
Will:
19-Aug-2009
ok here is the answer from Cheyenne:
HTTP/1.1 301 Moved Permanently
Server: Cheyenne/0.9.20
Date: Thu, 20 Aug 2009 09:43:23 GMT
Connection: close

Location: http://docs.google.com/Doc?docid=0AcdrOHdpKfrWZGZwd3Z4MmJfMnNxcDJkNmZu&amp;hl=en
Set-Cookie: RSPSID=OTWARJZIFLZYABVJOACFFTZY; path=/md; HttpOnly
Will:
19-Aug-2009
answer from the redirection:
HTTP/1.1 302 Moved Temporarily
Content-Type: text/html; charset=UTF-8
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: Fri, 01 Jan 1990 00:00:00 GMT
Date: Wed, 19 Aug 2009 21:43:58 GMT

Set-Cookie: WRITELY_UID=001dfpwvx2b|928b9de9e7bf56448b665282fc69988b; 
Path=/; HttpOnly

Set-Cookie: GDS_PREF=hl=en;Expires=Sat, 17-Aug-2019 21:43:58 GMT;HttpOnly

Set-Cookie: SID=DQAAAHcAAAB0kldc4zZSC_0FoiL6efkWE11k9SQkAIn-N3WfAzIOVe1cM-remnLUtV3Z4M-BFRf5eknz7hr_U3YzW94nECo0-aDnpxrLGiBglWGN4VkfLr5Hh7t2XNyRCA3VWd005SfCmZ9D8-1MUltjRI8X56VLde5Wy8HD92gh-8YkJBJxQA;Domain=.google.com;Path=/;Expires=Sat, 
17-Aug-2019 21:43:58 GMT

Location: https://www.google.com/accounts/ServiceLogin?service=writely&passive=true&nui=1&continue=http%3A%2F%2Fdocs.google.com%2FDoc%3Fdocid%3D0AcdrOHdpKfrWZGZwd3Z4MmJfMnNxcDJkNmZu%26amp%3Bhl%3Den&followup=http%3A%2F%2Fdocs.google.com%2FDoc%3Fdocid%3D0AcdrOHdpKfrWZGZwd3Z4MmJfMnNxcDJkNmZu%26amp%3Bhl%3Den&ltmpl=homepage&rm=false
Content-Encoding: gzip
X-Content-Type-Options: nosniff
Content-Length: 325
Server: GFE/2.0
Will:
19-Aug-2009
more redirection:
HTTP/1.1 302 Moved Temporarily

Set-Cookie: WRITELY_SID=DQAAAHoAAADh80lBIw7e5Hg06TLEBgCY33XQGJ1aUH5OrCF_ir1xLwffKNaCqNdUL6qYfvgjNppDBI4lTNBSTjJWMG_Ze0_qJnveBCAtihBDFwBlOb-H7RlkfgJwM7pBbyKV7bm4M3mqUivD1emtpxgl32vG8CEP1poQ2479HQXrlobsp7Egzw;Domain=docs.google.com;Path=/;Expires=Thu, 
03-Sep-2009 21:43:59 GMT

Location: http://docs.google.com/Doc?docid=0AcdrOHdpKfrWZGZwd3Z4MmJfMnNxcDJkNmZu&amp%3Bhl=en&pli=1
Content-Type: text/html; charset=UTF-8
Content-Encoding: gzip
Date: Wed, 19 Aug 2009 21:43:59 GMT
Expires: Wed, 19 Aug 2009 21:43:59 GMT
Cache-Control: private, max-age=0
X-Content-Type-Options: nosniff
Content-Length: 232
Server: GFE/2.0
Will:
19-Aug-2009
and the the target page:
HTTP/1.1 200 OK

Set-Cookie: WRITELY_SID=DQAAAHoAAADh80lBIw7e5Hg06TLEBgCY33XQGJ1aUH5OrCF_ir1xLwffKNaCqNdUL6qYfvgjNppDBI4lTNBSTjJWMG_Ze0_qJnveBCAtihBDFwBlOb-H7RlkfgJwM7pBbyKV7bm4M3mqUivD1emtpxgl32vG8CEP1poQ2479HQXrlobsp7Egzw;Domain=docs.google.com;Path=/;Expires=Thu, 
03-Sep-2009 21:43:59 GMT

Set-Cookie: GDS_PREF=hl=en;Expires=Sat, 17-Aug-2019 21:43:59 GMT;HttpOnly

Set-Cookie: user=; Expires=Tue, 18-Aug-2009 21:43:59 GMT; Path=/; 
HttpOnly

Set-Cookie: login=; Expires=Tue, 18-Aug-2009 21:43:59 GMT; Path=/; 
HttpOnly
Content-Type: text/html; charset=UTF-8
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: Fri, 01 Jan 1990 00:00:00 GMT
Date: Wed, 19 Aug 2009 21:43:59 GMT
Content-Encoding: gzip
Transfer-Encoding: chunked
X-Content-Type-Options: nosniff
Server: GFE/2.0
Dockimbel:
15-Sep-2009
It works here : 
<%response/set-status/msg 201 "Test"%>

15/9-08:46:50.9-[HTTPd] Response=>
HTTP/1.1 201 Test
Server: Cheyenne/0.9.20

<%response/set-status/msg 404 "Test"%>

15/9-08:48:28.118-[HTTPd] Response=>
HTTP/1.1 404 Test
Server: Cheyenne/0.9.20
Dockimbel:
15-Sep-2009
I get the following response, looks OK :

15/9-11:07:53.546-[HTTPd] Response=>
HTTP/1.1 404 Person not found
Server: Cheyenne/0.9.20
Date: Tue, 15 Sep 2009 09:07:53 GMT
Content-Length: 53
Content-Type: text/html
Connection: Keep-Alive
Dockimbel:
15-Sep-2009
(using the above test RSP script)

>> read http://localhost/set-msg.rsp
connecting to: localhost

** User Error: Error.  Target url: http://localhost/set-msg.rspcould 
not be retrieved.  Server
 response: HTTP/1.1 404 Person not found
** Near: read http://localhost/set-msg.rsp
Kaj:
9-Nov-2009
There's nothing specific you have to do on the web server side except 
providing the service interfaces (regular HTTP responses)
Dockimbel:
22-Dec-2009
Cheyenne is already doing such kind of "connections", for example, 
PHP requests : HTTP => Cheyenne => TCP => PHP server.
Kaj:
22-Dec-2009
The trick is that web sockets needs a little server support to down/upgrade 
(as you see it) a HTTP connection to a more flexible TCP connection
Kaj:
24-Dec-2009
It's the evolutionary endpoint of Comet. It throws in special server 
and client support to enable them to keep an open, stateful connection, 
by switching an HTTP connection to what is effectively a lower level 
TCP connection
Dockimbel:
31-Dec-2009
That comes from the way web socket's connection are initiated, it 
starts like a simple HTTP GET request and the server is supposed 
to validate that request, check access authorization if required, 
etc... So, to avoid duplicating work, I choose to re-use RSP framework 
as much as possible. The initial ws:// URL must point to a valid 
RSP script so that the server can check, for example, RSP session 
cookie for access rights.
Dockimbel:
3-Jan-2010
Web sockets server-side support code is much shorter than HTTP, so, 
in theory, it should scale higher.
1 / 130[1] 2