squid-
cache.org
Optimising Web Delivery
Docs
Download
Donate
Support
About
Contact
Shop
Blog
src
HttpBody.h
Go to the documentation of this file.
1
/*
2
* Copyright (C) 1996-2023 The Squid Software Foundation and contributors
3
*
4
* Squid software is distributed under GPLv2+ license and includes
5
* contributions from numerous individuals and organizations.
6
* Please see the COPYING and CONTRIBUTORS files for details.
7
*/
8
9
#ifndef HTTPBODY_H_
10
#define HTTPBODY_H_
11
12
#include "
sbuf/SBuf.h
"
13
14
class
Packable
;
// TODO: Add and use base/forward.h.
15
21
class
HttpBody
22
{
23
public
:
24
HttpBody
() {}
25
26
void
set
(
const
SBuf
&newContent) {
raw_
= newContent; }
27
32
void
packInto
(
Packable
*)
const
;
33
35
void
clear
() {
raw_
.
clear
(); }
36
38
bool
hasContent
()
const
{
return
raw_
.
length
() > 0; }
39
41
size_t
contentSize
()
const
{
return
raw_
.
length
(); }
42
44
const
char
*
content
()
const
{
return
raw_
.
rawContent
(); }
45
46
private
:
47
HttpBody
&
operator=
(
const
HttpBody
&);
//not implemented
48
HttpBody
(
const
HttpBody
&);
// not implemented
49
50
SBuf
raw_
;
// body bytes
51
};
52
53
#endif
/* HTTPBODY_H_ */
54
SBuf.h
HttpBody
Definition:
HttpBody.h:22
HttpBody::hasContent
bool hasContent() const
Definition:
HttpBody.h:38
HttpBody::content
const char * content() const
Definition:
HttpBody.h:44
HttpBody::raw_
SBuf raw_
Definition:
HttpBody.h:50
HttpBody::packInto
void packInto(Packable *) const
Definition:
HttpBody.cc:14
HttpBody::operator=
HttpBody & operator=(const HttpBody &)
HttpBody::contentSize
size_t contentSize() const
Definition:
HttpBody.h:41
HttpBody::clear
void clear()
clear the HttpBody content
Definition:
HttpBody.h:35
HttpBody::set
void set(const SBuf &newContent)
Definition:
HttpBody.h:26
HttpBody::HttpBody
HttpBody()
Definition:
HttpBody.h:24
HttpBody::HttpBody
HttpBody(const HttpBody &)
Packable
Definition:
Packable.h:53
SBuf
Definition:
SBuf.h:94
SBuf::rawContent
const char * rawContent() const
Definition:
SBuf.cc:509
SBuf::length
size_type length() const
Returns the number of bytes stored in SBuf.
Definition:
SBuf.h:415
SBuf::clear
void clear()
Definition:
SBuf.cc:175
Introduction
About Squid
Why Squid?
Squid Developers
How to Donate
How to Help Out
Getting Squid
Squid Source Packages
Squid Deployment Case-Studies
Squid Software Foundation
Documentation
Quick Setup
Configuration:
Reference
Examples
FAQ
and
Wiki
Guide Books:
Beginners
Definitive
Non-English
More...
Support
Security Advisories
Bugzilla Database
Mailing lists
Contacting us
Commercial services
Project Sponsors
Squid-based products
Miscellaneous
Developer Resources
Related Writings
Related Software:
Authenticators
Ecap
Icap
Ident
Log Analysis
Monitor
Proxies
Redirectors
General
Squid Artwork
Web Site Translations
Japanese
Mirrors
Website:
il
...
full list
FTP Package Archive