Skip to content

digest.auth_header throws: NoMethodError (undefined method `gsub' for nil:NilClass) #18

Description

@rgaufman

This is an response['WWW-Authenticate'] from a Hikvision IP camera, when I try to generate an auth-header I get this:

> uri
=> #<URI::HTTP http://admin:password1@192.168.1.163/ISAPI/Event/notification/alertstream>
> WWWAuthenticate
=> ["Digest qop=\"auth\", realm=\"IP Camera(C2198)\", nonce=\"4e474d325a6a55335a474d364d57566d596a4a6b4d446b3d\", stale=\"FALSE\"", "Basic realm=\"IP Camera(C2198)\""]
> digest.auth_header(uri, WWWAuthenticate, 'GET')
Traceback (most recent call last):
        1: from (irb):37
NoMethodError (undefined method `gsub' for nil:NilClass)

Any ideas?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions