Hi David,
The implicit type conversion on the variables are a pain, but there are
already a couple
of places where this happens. Using always the Tcl_GetByteArrayFromObj
can lead
to encoding problems. One has actually the binary/non-binary problem and the
encoding problem.
I have developed a few test cases for ns_http and ns_ssl which should
help to
make the code more stable and to refine certain corner cases. Furthermore
i added an api call for "binary" content-types for which
Tcl_GetByteArrayFromObj()
should always be used. The interface should be probably extended for
ensuring
as well binary transmission for gzipped content, i will check this the
next days.
-gn
Am 30.07.15 um 12:33 schrieb David Osborne:
Thanks Gustaf - I have just tried these changes and it appear to work
just fine.
I just have to be careful when handling the binary content to pass to
the -body option, if I inadvertently force an internal string
representation to be generated then if will be corrupted by ns_ssl in
transit since it will treat it like a string.
Previously I had:
set content [ns_conn content -binary]
if { $content ne "" } {
lappend cmd -body $content
}
which didn't work with this code change, but sticking to bytearray
aware commands worked:
set content [ns_conn content -binary]
if { [string length $content] > 0 } {
lappend cmd -body $content
}
On 29 July 2015 at 13:55, Gustaf Neumann <neum...@wu.ac.at
<mailto:neum...@wu.ac.at>> wrote:
hi david,
i've commit a change that handles binary data different form
non-binary
data, as used on several
places in NaviServer. With this change, the problem should be solved.
all the best
-g
------------------------------------------------------------------------------
_______________________________________________
naviserver-devel mailing list
naviserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/naviserver-devel
--
Univ.Prof. Dr. Gustaf Neumann
WU Vienna
Institute of Information Systems and New Media
Welthandelsplatz 1, A-1020 Vienna, Austria
------------------------------------------------------------------------------
_______________________________________________
naviserver-devel mailing list
naviserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/naviserver-devel