http-client-procs.tcl

  • last updated 7 hours ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
Fix more typos

  1. … 11 more files in changeset.
Fix typos

  1. … 2 more files in changeset.
Bugfix

Decode form variables when a payload is transformed from form-urlencoded to multipart. Fix documentation for -formvars parameter

Bugfix

Avoid double encoding when content is in the same encoding as that of tcl interpreter

Fix nonsense fconfigure -translation $encoding

Try to make code clearer

merged changes from the oacs-5-9 branch and resolved conflicts

    • -404
    • +1012
    ./http-client-procs.tcl
  1. … 7834 more files in changeset.
Standardize spellings of names

  1. … 6 more files in changeset.
Standardize spelling of names of products (Tcl, AOLserver, PostgreSQL, NaviServer)

  1. … 43 more files in changeset.
Fix spelling errors

  1. … 22 more files in changeset.
Improve robustness of "file delete" operations

  1. … 25 more files in changeset.
Reinitialize file data array at each cycle

Fix typo, simplify and clarify content-type header manipulation

Don't add extra content-type when users specifies their own

Fix missing square bracket

Don't mess with user-defined content-type, unless required

Spool POST payload bigger than a threshold (default ~25MB) to a file, instead of keeping in memory the entire request.

This exploits (transparently) -body_file option in the ns_http API and native curl features.

Put some caching into utilities around to reduce db calls and execs.

Creation of this header is already done properly into ns_http

Insert content-length only when transfer-encoding is not chunked

- Aligned and fixed behavior for encoding of request with respect to redirect in the two implementations

- Use only binary encoding in curl implementation for the file used to spool the body, to avoid

corruption of content (eventual encoding has already happened in its proper place)

- Allow only for curl to exploit native file POSTing capability (only way to POST files > 2GB)

TODO: wrap this behavior in the generic API

- Add content-length header when POSTing content, as some servers will require it (curl did this already)

Put again >= in place as before

Reverting previous change: I don't know since when in 4.99.12 dev versions we have dropped ns_ssl. Just stick to plain 4.99.12

Use 4.99.11 as comparison version to say: "from 4.99.12 upwards"

Removed use of deprecated ns_ssl API for Naviserver versions newer than 4.99.12

Removed use of util_memoize in favor of ns_memoize

- shorten export_vars argument list

Fix bug http://openacs.org/bugtracker/openacs/bug?bug_number=3292:

Native and curl implementation of util::http behave inconsistently when dealing with json content and special characters

Also fix another inconsistency: curl added an extra space after pager content.

New feature for http client API:

util::http::basic_auth - BASIC authentication

util::http::cookie_auth - Generical cookie based authentication. This proc allows issuing authenticated calls to an OpenACS instance and other sistems using this kind of method

Now all util::http calls won't return an error when max redir depth is reached, but just the result at the page we visited as last (including cookies).

  1. … 1 more file in changeset.
Merging back to HEAD all changes that happened in branch oacs-5-8 between tags: vg-merge-oacs-5-8-from-20141027 and vg-merge-oacs-5-8-from-20150427

  1. … 520 more files in changeset.
- fix redirection in native mode:

A redirect from http might point to https, which in turn

might not be configured. So we have to go through

util::http::request again.

Modified http api to return response headers to the caller

- use ad_tmpnam instead of ns_tmpnam since the latter is deprecated

Resorting to passing through filesystem when sending body in post requests: too much concerns related to escaping in a suitable way for every possible shell (windows, linux...)