1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-04-30 11:50:28 +02:00
Commit graph

42 commits

Author SHA1 Message Date
Mark H Weaver
23cf330c86 Add support for HTTP proxies.
* module/web/http.scm (http-proxy-port?, set-http-proxy-port?!): New
  exported procedures.
  (write-request-line): If we're using an http proxy, write an
  absolute-URI in the request line.

* module/web/client.scm: Import (web http).
  (current-http-proxy): New exported parameter.
  (open-socket-for-uri): If 'current-http-proxy' is not false,
  connect to the proxy instead of the URI host, and use
  'set-http-proxy-port?!' to make note of that fact.

* doc/ref/web.texi (Web Client): Document 'current-http-proxy'.
2013-07-16 19:33:32 -04:00
Daniel Hartwig
dc87126115 minor tweaks to web documentation
* doc/ref/web.texi: Say `World Wide Web'; the hyphenated form is almost
  never used (c.f. w3.org).

  General predicate arguments are named `obj'.  Fill in arguments
  omitted from some procedure definitions (e.g. `request-method').

  Minor tweaks, such as using en-dash and missing markup as appropriate.
  Wrap very long deffn lines.

* module/web/*.scm: Expand texinfo markup in doc strings.  Synchronize
  with changes in web.texi.
2013-03-16 17:53:53 +08:00
Jason Earl
a4b4fbbdaa excise use of "iff" in the manual
* doc/ref/api-compound.texi:
* doc/ref/api-control.texi:
* doc/ref/api-data.texi:
* doc/ref/api-macros.texi:
* doc/ref/api-modules.texi:
* doc/ref/api-procedures.texi:
* doc/ref/api-scheduling.texi:
* doc/ref/api-smobs.texi:
* doc/ref/api-undocumented.texi:
* doc/ref/api-utility.texi:
* doc/ref/compiler.texi:
* doc/ref/intro.texi:
* doc/ref/scheme-using.texi:
* doc/ref/sxml.texi:
* doc/ref/web.texi: Change uses of "iff" to "if, otherwise".  Fixes bug
  10302.
2013-03-10 22:29:18 +01:00
Bake Timmons
994d87be35 Improve keyword notation of Texinfo function definitions.
* doc/ref/api-debug.texi:
* doc/ref/api-evaluation.texi:
* doc/ref/api-modules.texi:
* doc/ref/compiler.texi:
* doc/ref/web.texi: Make Texinfo function headers more consistent.
  Change lesser used keyword notation to the predominant form.

* doc/ref/api-procedures.texi: Fix an argument name in a header that should
  use repeated argument notation.

* doc/ref/srfi-modules.texi: Update references in Texinfo function
  definition body to match previously updated variable notation in
  definition header.
2013-03-02 20:34:29 +01:00
Andy Wingo
3e31e75a46 begin rewriting SXML docs
* doc/ref/sxml.texi (SXML): Reorder and begin rewriting.  Fix formatting
  throughout, provide a new introduction, and the beginning of proper
  SSAX documentation.

* doc/ref/sxml-match.texi:
* doc/ref/texinfo.texi:
* doc/ref/web.texi: Update references to new node names.
2013-01-28 10:52:44 +01:00
Andy Wingo
990b11c53f Add http-post, http-put, et cetera
* module/web/client.scm (ensure-uri): New helper.
  (open-socket-for-uri): Accept a URI as a string or as a URI object.
  (extend-request, sanitize-request): New helpers, like the
  corresponding functions in (web server).
  (decode-response-body): Add a reference to the HTTP/1.1 spec, and
  use (ice-9 iconv).
  (request): New helper, factoring all aspects of sending an HTTP
  request and getting a response.
  (http-get): Redefine in terms of http-get.  Deprecate the
  #:extra-headers argument in favor of #:headers.  Allow a body.  Add a
  #:streaming? argument, subsuming the functionality of http-get*.
  (http-get*): Deprecate.
  (http-head, http-post, http-put, http-delete, http-trace)
  (http-options): Define interfaces for all HTTP verbs.

* test-suite/tests/web-client.test: Add tests.

* doc/ref/web.texi: Update documentation.

Thanks to Gregory Benison for the initial patch.
2013-01-11 15:40:00 +01:00
Ludovic Courtès
91e693a8e8 web: Add `http-get*'.
* module/web/client.scm (http-get*): New procedure.
* doc/ref/web.texi (Web Client): Document it.
2012-11-28 22:50:26 +01:00
Ludovic Courtès
75d6c59fc2 web: Add `response-body-port'.
* module/web/response.scm (make-delimited-input-port,
  response-body-port): New procedures.
  (read-response-body): Use `response-body-port'.

* test-suite/tests/web-response.test ("example-1")["response-body-port"]:
  New test.
  ("example-2")["response-body-port"]: New test.
2012-11-28 22:41:25 +01:00
Ludovic Courtès
ee2d874119 web: Export `text-content-type?'.
* module/web/client.scm (text-type?): Remove.
  (decode-response-body): Use `text-content-type?'.
* module/web/response.scm (text-content-type?): New procedure.
* doc/ref/web.texi (Responses): Document it.
2012-11-28 22:12:59 +01:00
Daniel Hartwig
890647559d (web uri): document that uri-port is an integer
* doc/ref/web.texi (URIs):
* module/web/uri.scm (build-uri): Document that uri-port is an integer.
2012-11-24 15:54:07 +01:00
Daniel Hartwig
06883ae000 syncronize web module docstrings with manual
* doc/ref/web.texi: Fix spacing.  Update with a few missing function
  descriptions.

* module/web/client.scm:
* module/web/http.scm:
* module/web/request.scm:
* module/web/server.scm:
* module/web/uri.scm: Update docstrings from manual (reworked by Ludovic
  Courtès).
2012-11-24 15:40:14 +01:00
Andy Wingo
32299e49e8 add http/1.1 transfer codings to the NEWS
* doc/ref/web.texi (Transfer Codings): Add a note about modules.
* NEWS: Add NEWS for transfer codings.
2012-07-06 22:24:25 +02:00
Ian Price
64ead01db7 Document and export `declare-opaque-header!'
* module/web/http.scm (declare-opaque-header!): Add docstring. New export.
* doc/ref/web.texi (HTTP): Add documentation.
2012-07-06 22:18:13 +02:00
Ian Price
312e79f8d5 Add HTTP Chunked Encoding support to web modules.
* doc/ref/web.texi(Transfer Codings): New subsection for transfer codings.
* module/web/http.scm(make-chunked-input-port,
  make-chunked-output-port): New procedures.
* module/web/response.scm (read-response-body): Handle chunked responses.
* test-suite/tests/web-response.test: Add test.
* test-suite/tests/web-http.test: Add tests.

afd
2012-07-06 22:18:12 +02:00
Andy Wingo
d540a1d648 fix typo in web.texi
* doc/ref/web.texi (HTTP Headers): Fix typo in example.  Fixes
  http://bugs.gnu.org/10890.
2012-07-06 12:23:39 +02:00
Andy Wingo
98aa6f5bde typo fix in web.texi
* doc/ref/web.texi (URIs): Fix a typo/thinko.
2012-07-02 23:02:20 +02:00
Andy Wingo
164a78b355 web server: do not provide a response body where it is not permitted
* module/web/response.scm (response-must-not-include-body?): New
  function.

* doc/ref/web.texi: Doc the function.

* module/web/server.scm (sanitize-response): Error if we have a body,
  but the response type does not permit a body.  If we are responding to
  a HEAD request, silently drop the body.
2012-02-12 13:29:19 +01:00
Bake Timmons
64de6db5c6 Make consistent the usage of variable names in the function definitions found in the Texinfo docs.
* doc/r5rs/r5rs.texi:
* doc/ref/api-compound.texi:
* doc/ref/api-data.texi:
* doc/ref/api-debug.texi:
* doc/ref/api-evaluation.texi:
* doc/ref/api-io.texi:
* doc/ref/api-modules.texi:
* doc/ref/api-procedures.texi:
* doc/ref/api-scheduling.texi:
* doc/ref/api-smobs.texi:
* doc/ref/compiler.texi:
* doc/ref/misc-modules.texi:
* doc/ref/posix.texi:
* doc/ref/scheme-using.texi:
* doc/ref/srfi-modules.texi:
* doc/ref/vm.texi:
* doc/ref/web.texi:
* doc/sources/env.texi: Make usage of variable names of function definitions
  more consistent.
2012-02-02 12:04:16 +01:00
Andy Wingo
654ef4cf54 fix web.texi typo
* doc/ref/web.texi (HTTP Headers): Fix a typo.  Thanks to Brian Gough
  for the report.
2011-11-16 23:17:51 +01:00
Andy Wingo
ec81143964 add (web client) docs
* doc/ref/web.texi (Web Client): New doc section.
2011-10-12 11:24:58 +02:00
Andy Wingo
09b7459b49 web.texi: handler return types documentation
* doc/ref/web.texi (Web Server): More docs on handler return types.
2011-03-31 16:36:01 +02:00
Andy Wingo
2ebdf6b555 web.texi: fix uri->string invocation
* doc/ref/web.texi (Web Examples): Fix uri->string invocation.  Thanks
  to Romel Sandoval for the report.
2011-03-31 16:17:35 +02:00
Neil Jerram
5ec48b7045 Fix typos in (web ...) doc
* doc/ref/web.texi (Types and the Web): "help" -> "helpful".
  (HTTP): Add closing paren.  Remove code that looks like a leftover.
2011-02-18 23:11:49 +00:00
Ralf Wildenhues
ecb8733562 docs: fix typos in manual, and a couple in code comments.
* doc/ref/api-binding.texi, doc/ref/api-compound.texi,
doc/ref/api-control.texi, doc/ref/api-debug.texi,
doc/ref/api-io.texi, doc/ref/api-macros.texi,
doc/ref/api-procedures.texi, doc/ref/api-scheduling.texi,
doc/ref/api-undocumented.texi, doc/ref/api-utility.texi,
doc/ref/compiler.texi, doc/ref/goops.texi,
doc/ref/libguile-concepts.texi, doc/ref/misc-modules.texi,
doc/ref/posix.texi, doc/ref/r6rs.texi, doc/ref/slib.texi,
doc/ref/srfi-modules.texi, doc/ref/sxml-match.texi,
doc/ref/tools.texi, doc/ref/vm.texi, doc/ref/web.texi,
doc/sources/env.texi, doc/sources/jimb-org.texi,
doc/sources/scheme-concepts.texi, doc/sources/unix.texi,
module/ice-9/optargs.scm: Fix typos.
* doc/r4rs/r5rs.texi: Likewise.  Do not capitalize code symbols
even at the start of a sentence.
* doc/ref/api-data.texi: Likewise.  Also, remove executable bit.
2011-02-09 22:28:49 +00:00
Andy Wingo
0715410946 web.texi fix
* doc/ref/web.texi (HTTP Headers): Fix transfer-encoding example.
2011-01-22 19:56:23 +01:00
Andy Wingo
2e6f5ea4cd web.texi defun -> deffn
* doc/ref/web.texi (URIs): Change instances of @defun to @deffn with
  {Scheme Procedure}.
2011-01-10 22:44:41 -08:00
Andy Wingo
f4ec6877bb more web.texi foo
* doc/ref/web.texi (Web Server, Web Examples): Update.
2011-01-10 22:44:41 -08:00
Andy Wingo
de54fb6d5e update web.text documentation for requests and responses
* doc/ref/web.texi (Requests, Responses): Update, and add a note on
  character encodings.
2011-01-10 22:44:41 -08:00
Andy Wingo
ff8339db69 update web.texi for (web http) changes
* doc/ref/web.texi (HTTP Headers): Update to reflect current code, and
  to reformat. Not sure if it's an improvement...
2011-01-10 09:32:26 -08:00
Andy Wingo
32de1aa783 update (web http) docs
* doc/ref/web.texi (HTTP): Update docs to correspond with current code.
2011-01-08 15:20:28 -08:00
Andy Wingo
58baff08bc revert unfinished web.texi changes
These were prematurely committed in
17072fd2c6.
2011-01-07 09:31:36 -08:00
Andy Wingo
17072fd2c6 lookup_interned_symbol uses get_handle_by_hash
* libguile/symbols.c (lookup_interned_symbol): Change to use
  scm_hash_fn_get_handle_by_hash.
2011-01-07 09:18:37 -08:00
Andy Wingo
929ccf48fc read-header returns EOF at end, update (web http) docs
* doc/ref/web.texi (HTTP): Add an example for declaring a header, and
  adapt to read-header change.

* module/web/http.scm (read-header): Return EOF for both values if there
  are no more headers, instead of #f.
  (read-headers): Adapt.
2011-01-07 09:18:36 -08:00
Andy Wingo
569269b4b2 update URI documentation
* doc/ref/web.texi (Types and the Web): Fix spacing.
  (URIs): Give default values, and clarify a number of procedure docs.
  Update "encoding" name, and string->uri name.
2011-01-07 09:18:36 -08:00
Andy Wingo
b3f9444892 clarify uri fragment discussion
* doc/ref/web.texi (URIs): Clarify the discussion of URI fragments.
2011-01-07 09:18:36 -08:00
Andy Wingo
d75a81b128 rewrite web.texi intro
* doc/ref/web.texi (Web): Rewrite the intro.
  (Types and the Web): New subsection, a mini-rant.
2011-01-07 09:18:36 -08:00
Andy Wingo
5cdab8b8f6 more web.texi "hacking"
* doc/ref/web.texi (Web Server, Web Examples): Finish these sections.
2010-12-17 12:58:43 +01:00
Andy Wingo
e471a3ee2f more web.texi work
* doc/ref/web.texi (Requests, Responses): Flesh out.
  (Web Examples): New section, replacing "Web Handlers". The only one
  that's not really written yet.
2010-12-16 19:31:50 +01:00
Andy Wingo
1148d02973 add section on format of parsed http headers
* doc/ref/web.texi (HTTP Headers): New section. Needs some examples,
  though.
2010-12-16 19:06:41 +01:00
Andy Wingo
ac7f17e3ca fix web.texi
* doc/ref/web.texi: Texinfo syntax fixen!
2010-12-16 16:44:44 +01:00
Andy Wingo
299cd1a229 update web.texi
* doc/ref/web.texi (URIs, HTTP): Update these sections.
2010-12-16 16:43:01 +01:00
Andy Wingo
8db7e0947d add web.texi to manual
* doc/ref/web.texi: New file, here to document the various (web ...)
  modules.  Quite a rough beginning, but it is a start...

* doc/ref/guile.texi:
* doc/ref/Makefile.am: Add to manual.
2010-12-16 14:52:25 +01:00