This file is indexed.

/usr/include/GNUstep/NGHttp/NGHttpResponse.h is in libsope-dev 2.2.17-1build2.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
/*
  Copyright (C) 2000-2005 SKYRIX Software AG

  This file is part of SOPE.

  SOPE is free software; you can redistribute it and/or modify it under
  the terms of the GNU Lesser General Public License as published by the
  Free Software Foundation; either version 2, or (at your option) any
  later version.

  SOPE is distributed in the hope that it will be useful, but WITHOUT ANY
  WARRANTY; without even the implied warranty of MERCHANTABILITY or
  FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public
  License for more details.

  You should have received a copy of the GNU Lesser General Public
  License along with SOPE; see the file COPYING.  If not, write to the
  Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
  02111-1307, USA.
*/

#ifndef __NGHttp_NGHttpResponse_H__
#define __NGHttp_NGHttpResponse_H__

#import "NGHttpMessage.h"

@class NSString;
@class NGHttpRequest, NGHttpChallenge;

typedef enum {
  NGHttpStatusCode_unknown = 0,

  // 1xx informational
  NGHttpStatusCode_Continue                    = 100,
  NGHttpStatusCode_SwitchingProtocols          = 101,

  // 2xx successful
  NGHttpStatusCode_OK                          = 200,
  NGHttpStatusCode_Created                     = 201,
  NGHttpStatusCode_Accepted                    = 202,
  NGHttpStatusCode_NonAuthoritativeInformation = 203,
  NGHttpStatusCode_NoContent                   = 204,
  NGHttpStatusCode_ResetContent                = 205,
  NGHttpStatusCode_PartialContent              = 206,

  // 3xx redirection
  NGHttpStatusCode_MultipleChoices             = 300,
  NGHttpStatusCode_MovedPermanently            = 301,
  NGHttpStatusCode_MovedTemporarily            = 302,
  NGHttpStatusCode_SeeOther                    = 303,
  NGHttpStatusCode_NotModified                 = 304,
  NGHttpStatusCode_UseProxy                    = 305,

  // 4xx client error
  NGHttpStatusCode_BadRequest                  = 400,
  NGHttpStatusCode_Unauthorized                = 401,
  NGHttpStatusCode_PaymentRequired             = 402,
  NGHttpStatusCode_Forbidden                   = 403,
  NGHttpStatusCode_NotFound                    = 404,
  NGHttpStatusCode_MethodNotAllowed            = 405,
  NGHttpStatusCode_NoneAcceptable              = 406,
  NGHttpStatusCode_ProxyAuthenticationRequired = 407,
  NGHttpStatusCode_RequestTimeout              = 408,
  NGHttpStatusCode_Conflict                    = 409,
  NGHttpStatusCode_Gone                        = 410,
  NGHttpStatusCode_LengthRequired              = 411,
  NGHttpStatusCode_UnlessTrue                  = 412,

  // 5xx server error
  NGHttpStatusCode_InternalServerError         = 500,
  NGHttpStatusCode_NotImplemented              = 501,
  NGHttpStatusCode_BadGateway                  = 502,
  NGHttpStatusCode_ServiceUnavailable          = 503,
  NGHttpStatusCode_GatewayTimeout              = 504,

  NGHttpStatusCode_last
} NGHttpStatusCode;

@interface NGHttpResponse : NGHttpMessage
{
  NGHttpStatusCode statusCode;
  NSString         *reason;

  NGHttpRequest *request;
}

- (id)initWithRequest:(NGHttpRequest *)_request;

- (id)initWithStatus:(int)_status reason:(NSString *)_reason
  header:(NGHashMap *)_header version:(NSString *)_version;

// accessors

- (void)setStatusCode:(NGHttpStatusCode)_code;
- (NGHttpStatusCode)statusCode;

- (void)setReason:(NSString *)_text;
- (NSString *)reason;

- (void)setRequest:(NGHttpRequest *)_request;
- (NGHttpRequest *)request;

@end

@interface NGHttpResponse(CommonHeaders)

- (void)setWWWAuthenticate:(NGHttpChallenge *)_challenge;
- (NGHttpChallenge *)wwwAuthenticate;

@end

static inline BOOL NGIsInformationalHttpStatusCode(NGHttpStatusCode _code) {
  return ((_code >= 100) && (_code < 200)) ? YES : NO;
}
static inline BOOL NGIsSuccessfulHttpStatusCode(NGHttpStatusCode _code) {
  return ((_code >= 200) && (_code < 300)) ? YES : NO;
}
static inline BOOL NGIsRedirectionHttpStatusCode(NGHttpStatusCode _code) {
  return ((_code >= 300) && (_code < 400)) ? YES : NO;
}
static inline BOOL NGIsClientErrorHttpStatusCode(NGHttpStatusCode _code) {
  return ((_code >= 400) && (_code < 500)) ? YES : NO;
}
static inline BOOL NGIsServerErrorHttpStatusCode(NGHttpStatusCode _code) {
  return ((_code >= 500) && (_code < 600)) ? YES : NO;
}

#endif /* __NGHttp_NGHttpResponse_H__ */