module HTTPX::Plugins::Cookies::Cookie::Scanner

  1. lib/httpx/plugins/cookies/cookie.rb

Methods

Public Instance

  1. quote

Constants

RE_BAD_CHAR = /([\x00-\x20\x7F",;\\])/.freeze  

Public Instance methods

quote(s)
[show source]
    # File lib/httpx/plugins/cookies/cookie.rb
166 def quote(s)
167   return s unless s.match(RE_BAD_CHAR)
168 
169   "\"#{s.gsub(/([\\"])/, "\\\\\\1")}\""
170 end