Re: 401 error



On 07/20/2015 01:29 PM, Sam Bull wrote:
On Fri, 17 Jul 2015, at 06:35 PM, Dan Winship wrote:
OK, well, it looks like the problem is that libsoup isn't sending the
username+password on the initial request (which is correct, since it
doesn't know that the server wants to use Basic auth), and the server is
returning 500 rather than 401. Which it really shouldn't do, but...

That bug has now been fixed, so it returns a 401 error as expected. Here's the output now: 
http://pastebin.com/NUR8qtKS

This still seems to be a server bug; it's returning a 401 error, but not
including a WWW-Authenticate header, so libsoup doesn't know what kind
of authentication the server wants it to use.


On 07/19/2015 12:48 PM, Sam Bull wrote:
On Fri, 2015-07-17 at 13:35 -0400, Dan Winship wrote:
  let auth_mgr = httpSession.get_feature(Soup.TYPE_AUTH_MANAGER);
  let auth = Soup.Auth.new(Soup.TYPE_AUTH_BASIC, msg, "Basic
realm=dummy");

I just get errors like this:

        (gnome-shell:4628): Gjs-WARNING **: JS ERROR: Error: Expected
        type GType for Argument 'type' but got type 'undefined'

It seems that neither Soup.TYPE_AUTH_MANAGER or Soup.TYPE_AUTH_BASIC are
defined.

Ah, ok, it looks like GObject.type_from_name('SoupAuthManager') and
GObject.type_from_name('SoupAuthBasic') might work


-- Dan


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]