bug#32528: http-post breaks with XML response payload containing boundary

2018-08-29 Thread Ricardo Wurmus


Hi Mark,

> Ricardo Wurmus  writes:
>
[…]
>> The reason why it fails is that Guile processes the response and treats
>> the *payload* contained in the XML response as HTTP.
>
> No, this was a good guess, but it's not actually the problem.

You are right.  I also ended up trying with “wget --save-headers” after
sending the bug report and noticed the offending header like you did:

>   Content-Type: multipart/related; type="text/xml"; start=""; 
> boundary="=-=-="
>
>The problem is simply that our Content-Type header parser is broken.
> It's very simplistic and merely splits the string wherever ';' is found,
> and then checks to make sure there's only one '=' in each parameter,
> without taking into account that quoted strings in the parameters might
> include those characters.

Right.  I worked around this in guile-debbugs simply by replacing the
Content-Type header parser with one that lacks the check for the unique
“=” in the string part.

> I'll work on a proper parser for Content-Type headers.

Thanks!

--
Ricardo






bug#32580: Setting variables %load-should-autocompile and GUILE_AUTO_COMPILE in ~/.guile doesn't prevent compiling

2018-08-29 Thread seamus phenetols
I'm new to guile and scheme.  I compiled 2.2.4 from source yesterday.
I wish to silence the auto-compile chatter, other than real warnings and errors
while testing my programs.  There seems to be no way to do it, so I looked
for a way to disable auto-compile in ~/.guile configuration file.  No luck so 
far,
but the variables %load-should-autocompile and GUILE_AUTO_COMPILE
seem promising.  Sadly, they don't seem to prevent auto-compile when
set within ~/.guile.

Below is an excerpt of my shell session to demonstrate.  In case it may be
poorly formatted, I could make  a web paste for easy viewing.



$ rm -R $XDG_CACHE_HOME/guile/ccache
rm: cannot remove '/home/me/.cache/guile/ccache': No such file or directory
$ rm ~/.guile
rm: cannot remove '/home/me/.guile': No such file or directory
$
$ printf %s\\n '(display "Hello world!")' '(newline)' | tee ~/scheme/hello.scm
(display "Hello world!")
(newline)
$
$ guile ~/scheme/hello.scm
;;; note: auto-compilation is enabled, set GUILE_AUTO_COMPILE=0
;;;   or pass the --no-auto-compile argument to disable.
;;; compiling /home/me/scheme/hello.scm
;;; compiled 
/home/me/.cache/guile/ccache/2.2-LE-8-3.A/media/data/me/scheme/hello.scm.go
Hello world!
$
$ rm -R $XDG_CACHE_HOME/guile/ccache
$
$ printf %s\\n '(setenv "GUILE_AUTO_COMPILE" "0")' '(set! 
%load-should-autocompile #f)' | tee ~/.guile
(setenv "GUILE_AUTO_COMPILE" "0")
(set! %load-should-autocompile #f)
$
$ guile ~/scheme/hello.scm
;;; note: auto-compilation is enabled, set GUILE_AUTO_COMPILE=0
;;;   or pass the --no-auto-compile argument to disable.
;;; compiling /home/me/scheme/hello.scm
;;; compiled 
/home/me/.cache/guile/ccache/2.2-LE-8-3.A/media/data/me/scheme/hello.scm.go
Hello world!
$
$ guile --version
guile (GNU Guile) 2.2.4
Copyright (C) 2018 Free Software Foundation, Inc.

License LGPLv3+: GNU LGPL 3 or later .
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
$ ls --full-time -gGh ~/Downloads/src/guile-2.2.4.tar.gz
-rw-r--r-- 1 18M 2018-08-24 17:37:08.405232060 -0400 
/home/me/Downloads/src/guile-2.2.4.tar.gz
$