parameters: (value, is_filename=False)
return_statement: return value
docstring: r"""Unquotes a header value.  (Reversal of :func:`quote_header_value`).
      This does not use the real unquoting but what browsers are actually
      using for quoting.
  
      :param value: the header value to unquote.
      :rtype: str
docstring_summary: r"""Unquotes a header value.  (Reversal of :func:`quote_header_value`).
      This does not use the real unquoting but what browsers are actually
      using for quoting.
docstring_tokens: r Unquotes a header value . ( Reversal of : func : quote_header_value ) . This does not use the real unquoting but what browsers are actually using for quoting .
function: def unquote_header_value(value, is_filename=False):
      r"""Unquotes a header value.  (Reversal of :func:`quote_header_value`).
      This does not use the real unquoting but what browsers are actually
      using for quoting.
  
      :param value: the header value to unquote.
      :rtype: str
      """
      if value and value[0] == value[-1] == '"':
          # this is not the real unquoting, but fixing this so that the
          # RFC is met will result in bugs with internet explorer and
          # probably some other browsers as well.  IE for example is
          # uploading files with "C:\foo\bar.txt" as filename
          value = value[1:-1]
  
          # if this is a filename and the starting characters look like
          # a UNC path, then just return the value without quotes.  Using the
          # replace sequence below on a UNC path has the effect of turning
          # the leading double slash into a single slash and then
          # _fix_ie_filename() doesn't work correctly.  See #458.
          if not is_filename or value[:2] != '\\\\':
              return value.replace('\\\\', '\\').replace('\\"', '"')
      return value
function_tokens: def unquote_header_value ( value , is_filename = False ) : if value and value [ 0 ] == value [ - 1 ] == '"' : # this is not the real unquoting, but fixing this so that the # RFC is met will result in bugs with internet explorer and # probably some other browsers as well.  IE for example is # uploading files with "C:\foo\bar.txt" as filename value = value [ 1 : - 1 ] # if this is a filename and the starting characters look like # a UNC path, then just return the value without quotes.  Using the # replace sequence below on a UNC path has the effect of turning # the leading double slash into a single slash and then # _fix_ie_filename() doesn't work correctly.  See #458. if not is_filename or value [ : 2 ] != '\\\\' : return value . replace ( '\\\\' , '\\' ) . replace ( '\\"' , '"' ) return value