Merge branch 'master' of git://factorcode.org/git/factor
commit
4c56d92d46
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -61,5 +61,5 @@ SYMBOL: realms
|
||||||
#! Check if the user is authenticated in the given realm
|
#! Check if the user is authenticated in the given realm
|
||||||
#! to run the specified quotation. If not, use Basic
|
#! to run the specified quotation. If not, use Basic
|
||||||
#! Authentication to ask for authorization details.
|
#! Authentication to ask for authorization details.
|
||||||
over "Authorization" header-param authorization-ok?
|
over "authorization" header-param authorization-ok?
|
||||||
[ nip call ] [ drop authentication-error ] if ;
|
[ nip call ] [ drop authentication-error ] if ;
|
||||||
|
|
|
@ -77,7 +77,7 @@ SYMBOL: max-post-request
|
||||||
1024 256 * max-post-request set-global
|
1024 256 * max-post-request set-global
|
||||||
|
|
||||||
: content-length ( header -- n )
|
: content-length ( header -- n )
|
||||||
"content-length" peek at string>number dup [
|
"content-length" peek-at string>number dup [
|
||||||
dup max-post-request get > [
|
dup max-post-request get > [
|
||||||
"Content-Length > max-post-request" throw
|
"Content-Length > max-post-request" throw
|
||||||
] when
|
] when
|
||||||
|
|
|
@ -31,13 +31,13 @@ SYMBOL: cgi-root
|
||||||
|
|
||||||
"method" get >upper "REQUEST_METHOD" set
|
"method" get >upper "REQUEST_METHOD" set
|
||||||
"raw-query" get "QUERY_STRING" set
|
"raw-query" get "QUERY_STRING" set
|
||||||
"Cookie" header-param "HTTP_COOKIE" set
|
"cookie" header-param "HTTP_COOKIE" set
|
||||||
|
|
||||||
"User-Agent" header-param "HTTP_USER_AGENT" set
|
"user-agent" header-param "HTTP_USER_AGENT" set
|
||||||
"Accept" header-param "HTTP_ACCEPT" set
|
"accept" header-param "HTTP_ACCEPT" set
|
||||||
|
|
||||||
post? [
|
post? [
|
||||||
"Content-Type" header-param "CONTENT_TYPE" set
|
"content-type" header-param "CONTENT_TYPE" set
|
||||||
"raw-response" get length number>string "CONTENT_LENGTH" set
|
"raw-response" get length number>string "CONTENT_LENGTH" set
|
||||||
] when
|
] when
|
||||||
] H{ } make-assoc ;
|
] H{ } make-assoc ;
|
||||||
|
|
|
@ -25,7 +25,7 @@ SYMBOL: doc-root
|
||||||
|
|
||||||
: last-modified-matches? ( filename -- bool )
|
: last-modified-matches? ( filename -- bool )
|
||||||
file-http-date dup [
|
file-http-date dup [
|
||||||
"If-Modified-Since" header-param =
|
"if-modified-since" header-param =
|
||||||
] when ;
|
] when ;
|
||||||
|
|
||||||
: not-modified-response ( -- )
|
: not-modified-response ( -- )
|
||||||
|
|
|
@ -25,7 +25,7 @@ IN: webapps.fjsc
|
||||||
: compile-url ( url -- )
|
: compile-url ( url -- )
|
||||||
#! Compile the factor code at the given url, return the javascript.
|
#! Compile the factor code at the given url, return the javascript.
|
||||||
dup "http:" head? [ "Unable to access remote sites." throw ] when
|
dup "http:" head? [ "Unable to access remote sites." throw ] when
|
||||||
"http://" "Host" header-param rot 3append http-get compile "();" write flush ;
|
"http://" "host" header-param rot 3append http-get compile "();" write flush ;
|
||||||
|
|
||||||
\ compile-url {
|
\ compile-url {
|
||||||
{ "url" v-required }
|
{ "url" v-required }
|
||||||
|
|
Loading…
Reference in New Issue