From: Matthieu V. <mat...@nu...> - 2012-07-23 13:58:19
|
Hi, I'm trying to upgrade an existing application from version 1.89 of Yaws (in fact, a snapshot between 1.89 and 1.90, just before the big capflam patch set) to 1.90. We use Yaws in an embedded fashion. First, I would like to make a note that we faced a kind of BC break. We didn't had a `yaws` entry in our `#gconf` configuration record. This was creating an http header of the form `Server: undefined` which was causing `erlang:iolist_size` to crash due to the `undefined` value. We fixed this by adding the right configuration value (`yaws = "Yaws WebServer"`). I'm mentioning this because maybe an UPGRADE file could be added to the github repository which such information. Now, we are facing another problem but this time with Basic Authentication. When looking at the http headers we received from Yaws, the record containing the http basic authentication values extracted is `{[], "password", "Basic dXNlcjpwYXNzd29yZA==")`. The `User` variable is an empty list, instead of the user passed to the server in the original request. However, something strange is that, when we do this call `yaws:parse_auth("Basic dXNlcjpwYXNzd29yZA==").` in an erlang shell, the right result is returned `{"user", "password", "Basic dXNlcjpwYXNzd29yZA==")`. So, the `parse_auth` function is behaving correctly but it seems there something that is kind-of filtering the user out and replacing it by `[]`. When I output the `Arg` record received in the `out(Arg)` function, the record is already wrong, so there may be something I do wrong or that I misconfigured. I'm looking for help on this one because I'm clueless about what to check. For now, when the wrong pattern is appearing, we manually re-parse the data to get the credentials, so we can continue our upgrade. Thanks in advance and thank you for this good piece of software. Regards, Matt |