Authentication error or maybe it isn't? - no user/password was provided

Francis Daly francis at
Sun Oct 20 20:45:36 UTC 2013

On Sun, Oct 20, 2013 at 04:17:34PM -0400, dalmolin wrote:

Hi there,

> One strange thing I have noticed is that I keep getting an
> error in the Nginx error log for the Android device, here are the
> abbreviated logs from Nginx's access.log and error.log:
> access.log entries:
> - - [20/Oct/2013:15:38:49 -0400] "OPTIONS
> /USERID/testcalhttps/ HTTP/1.1" 401 194 "-" "CalDAV-Sync (Android) (like
> iOS/5.0.1 (9A405) dataaccessd/1.0) gzip" "-"
> - MYUSERID [20/Oct/2013:15:38:50 -0400] "OPTIONS
> /USERID/testcalhttps/ HTTP/1.1" 200 5 "-" "CalDAV-Sync (Android) (like
> iOS/5.0.1 (9A405) dataaccessd/1.0) gzip" "-"

That indicates that the client made a http request, was told "need auth",
and then repeated the request with authentication credentials which
were accepted.

That's pretty much how things are supposed to work.

The only odd thing I see is that the source IP address changed between
the two requests.

> error.log entries:
> 2013/10/20 15:38:49 [error] 6797#0: *241 no user/password was provided for
> basic authentication, client:, server: , request: "OPTIONS
> /USERID/testcalhttps/ HTTP/1.1", host: ""

That matches what access.log shows.

> The userid and password were correctly entered during setup of the calendar
> on the client and as I said it all works fine... I can add, delete, modify
> calendar entries and synch across all my devices. But I keep getting this
> pesky error when using my phone. 

Either accept that the phone is correct, and all of the other clients
are sending your password before they were asked for it; or change the
phone app to take the same shortcut.

It probably isn't a config setting in the phone app.

> So it looks like the
> userid/password are processed after the first request somehow.

Yes; the phone doesn't send the userid/password on the first request.

> Also, it may
> be helpful to know that the phone is connecting to Nginx via the internet
> and portforwarding via my router to the server. Might this error message
> simply be the result of the way I am accessing the server... as I don't get
> the same error when I access the server via the LAN and my laptop.

Probably not. Does the laptop via the internet show the same behaviour?

Francis Daly        francis at

More information about the nginx mailing list