]> gitweb.factorcode.org Git - factor.git/commitdiff
Merge branch 'experimental' into couchdb
authorAlex Chapman <chapman.alex@gmail.com>
Mon, 13 Oct 2008 04:44:42 +0000 (15:44 +1100)
committerAlex Chapman <chapman.alex@gmail.com>
Mon, 13 Oct 2008 04:44:42 +0000 (15:44 +1100)
1  2 
basis/http/client/client.factor

index 7fdc9bf5c9c95034510a6054271139b43d798288,9260f15a7b3df0aab9f3d6730a983ea64b640076..ef53e138acaa379dcb6d1db9060b8ba693ebb551
mode 100755,100644..100644
@@@ -120,7 -120,7 +120,7 @@@ SYMBOL: redirect
      ] if ; inline recursive
  
  : read-unchunked ( quot: ( chunk -- ) -- )
-     8192 read dup [
+     8192 read-partial dup [
          [ swap call ] [ drop read-unchunked ] 2bi
      ] [ 2drop ] if ; inline recursive
  
  
  PRIVATE>
  
 -: success? ( code -- ? ) 200 = ;
 +: success? ( code -- ? ) 200 299 between? ;
  
  ERROR: download-failed response ;
  
@@@ -203,9 -203,3 +203,9 @@@ M: download-failed error
  
  : http-post ( post-data url -- response data )
      <post-request> http-request ;
 +
 +: <put-request> ( data url -- request )
 +    <post-request> "PUT" >>method ;
 +
 +: http-put ( data url -- response data )
 +    <put-request> http-request ;