SlideShare a Scribd company logo
HTTP The Definitive Guide 1st Edition David
Gourley pdf download
https://ebookname.com/product/http-the-definitive-guide-1st-
edition-david-gourley/
Get Instant Ebook Downloads – Browse at https://ebookname.com
Instant digital products (PDF, ePub, MOBI) available
Download now and explore formats that suit you...
The Definitive Guide to SQLite Definitive Guide 1st
Edition Mike Owens
https://ebookname.com/product/the-definitive-guide-to-sqlite-
definitive-guide-1st-edition-mike-owens/
The Definitive Guide to SOA Oracle Service Bus Second
Edition The Definitive Guide Jeff Davies
https://ebookname.com/product/the-definitive-guide-to-soa-oracle-
service-bus-second-edition-the-definitive-guide-jeff-davies/
HBase The Definitive Guide 1st Edition Lars George
https://ebookname.com/product/hbase-the-definitive-guide-1st-
edition-lars-george/
The Role of Evidence in Risk Characterization Making
Sense of Conflicting Data 1st Edition Peter M.
Wiedemann
https://ebookname.com/product/the-role-of-evidence-in-risk-
characterization-making-sense-of-conflicting-data-1st-edition-
peter-m-wiedemann/
Credit Risk Scorecards Naeem Siddiqi
https://ebookname.com/product/credit-risk-scorecards-naeem-
siddiqi/
Endocrinology for the Small Animal Practitioner Made
Easy Series 1st Edition Panciera
https://ebookname.com/product/endocrinology-for-the-small-animal-
practitioner-made-easy-series-1st-edition-panciera/
L Anconitana The Woman from Ancona Ruzante
https://ebookname.com/product/l-anconitana-the-woman-from-ancona-
ruzante/
The Ancient Mediterranean World The Cambridge World
History of Slavery 1 1st Edition Keith Bradley
https://ebookname.com/product/the-ancient-mediterranean-world-
the-cambridge-world-history-of-slavery-1-1st-edition-keith-
bradley/
Wound Healing Biomaterials Volume 1 Therapies and
Regeneration 1st Edition Magnus Ågren
https://ebookname.com/product/wound-healing-biomaterials-
volume-1-therapies-and-regeneration-1st-edition-magnus-agren/
Handbook of minerals as nutritional supplements 1st
Edition Robert A. Disilvestro
https://ebookname.com/product/handbook-of-minerals-as-
nutritional-supplements-1st-edition-robert-a-disilvestro/
HTTP The Definitive Guide 1st Edition David Gourley
HTTP The Definitive Guide 1st Edition David Gourley
HTTP
The Definitive Guide
HTTP The Definitive Guide 1st Edition David Gourley
HTTP
The Definitive Guide
David Gourley and Brian Totty
with Marjorie Sayer, Sailu Reddy, and Anshu Aggarwal
Beijing • Cambridge • Farnham • Köln • Paris • Sebastopol • Taipei • Tokyo
HTTP: The Definitive Guide
by David Gourley and Brian Totty
with Marjorie Sayer, Sailu Reddy, and Anshu Aggarwal
Copyright © 2002 O’Reilly Media, Inc. All rights reserved.
Printed in the United States of America.
Published by O’Reilly Media, Inc., 1005 Gravenstein Highway North, Sebastopol,
CA 95472.
O’Reilly Media, Inc. books may be purchased for educational, business, or sales promotional use. On-
line editions are also available for most titles (safari.oreilly.com). For more information, contact our cor-
porate/institutional sales department: (800) 998-9938 or corporate@oreilly.com.
Editor: Linda Mui
Production Editor: Rachel Wheeler
Cover Designer: Ellie Volckhausen
Interior Designers: David Futato and Melanie Wang
Printing History:
September 2002: First Edition.
Nutshell Handbook, the Nutshell Handbook logo, and the O’Reilly logo are registered trademarks of
O’Reilly Media, Inc. HTTP: The Definitive Guide, the image of a thirteen-lined ground squirrel, and
related trade dress are trademarks of O’Reilly Media, Inc. Many of the designations used by
manufacturers and sellers to distinguish their products are claimed as trademarks. Where those
designations appear in this book, and O’Reilly Media, Inc. was aware of a trademark claim, the
designations have been printed in caps or initial caps.
While every precaution has been taken in the preparation of this book, the publisher and authors
assume no responsibility for errors or omissions, or for damages resulting from the use of the
information contained herein.
This book uses RepKover™
, a durable and flexible lay-flat binding.
ISBN-10: 1-56592-509-2
ISBN-13: 978-1-56592-509-0
[C] [01/08]
v
Table of Contents
Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xiii
Part I. HTTP: The Web’s Foundation
1. Overview of HTTP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
HTTP: The Internet’s Multimedia Courier 3
Web Clients and Servers 4
Resources 4
Transactions 8
Messages 10
Connections 11
Protocol Versions 16
Architectural Components of the Web 17
The End of the Beginning 21
For More Information 21
2. URLs and Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
Navigating the Internet’s Resources 24
URL Syntax 26
URL Shortcuts 30
Shady Characters 35
A Sea of Schemes 38
The Future 40
For More Information 41
3. HTTP Messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
The Flow of Messages 43
The Parts of a Message 44
vi | Table of Contents
Methods 53
Status Codes 59
Headers 67
For More Information 73
4. Connection Management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
TCP Connections 74
TCP Performance Considerations 80
HTTP Connection Handling 86
Parallel Connections 88
Persistent Connections 90
Pipelined Connections 99
The Mysteries of Connection Close 101
For More Information 104
Part II. HTTP Architecture
5. Web Servers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
Web Servers Come in All Shapes and Sizes 109
A Minimal Perl Web Server 111
What Real Web Servers Do 113
Step 1: Accepting Client Connections 115
Step 2: Receiving Request Messages 116
Step 3: Processing Requests 120
Step 4: Mapping and Accessing Resources 120
Step 5: Building Responses 125
Step 6: Sending Responses 127
Step 7: Logging 127
For More Information 127
6. Proxies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129
Web Intermediaries 129
Why Use Proxies? 131
Where Do Proxies Go? 137
Client Proxy Settings 141
Tricky Things About Proxy Requests 144
Tracing Messages 150
Proxy Authentication 156
Table of Contents | vii
Proxy Interoperation 157
For More Information 160
7. Caching . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161
Redundant Data Transfers 161
Bandwidth Bottlenecks 161
Flash Crowds 163
Distance Delays 163
Hits and Misses 164
Cache Topologies 168
Cache Processing Steps 171
Keeping Copies Fresh 175
Controlling Cachability 182
Setting Cache Controls 186
Detailed Algorithms 187
Caches and Advertising 194
For More Information 196
8. Integration Points: Gateways, Tunnels, and Relays . . . . . . . . . . . . . . . . . . . . 197
Gateways 197
Protocol Gateways 200
Resource Gateways 203
Application Interfaces and Web Services 205
Tunnels 206
Relays 212
For More Information 213
9. Web Robots . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215
Crawlers and Crawling 215
Robotic HTTP 225
Misbehaving Robots 228
Excluding Robots 229
Robot Etiquette 239
Search Engines 242
For More Information 246
10. HTTP-NG . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 247
HTTP’s Growing Pains 247
HTTP-NG Activity 248
viii | Table of Contents
Modularize and Enhance 248
Distributed Objects 249
Layer 1: Messaging 250
Layer 2: Remote Invocation 250
Layer 3: Web Application 251
WebMUX 251
Binary Wire Protocol 252
Current Status 252
For More Information 253
Part III. Identification, Authorization, and Security
11. Client Identification and Cookies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 257
The Personal Touch 257
HTTP Headers 258
Client IP Address 259
User Login 260
Fat URLs 262
Cookies 263
For More Information 276
12. Basic Authentication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 277
Authentication 277
Basic Authentication 281
The Security Flaws of Basic Authentication 283
For More Information 285
13. Digest Authentication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 286
The Improvements of Digest Authentication 286
Digest Calculations 291
Quality of Protection Enhancements 299
Practical Considerations 300
Security Considerations 303
For More Information 306
14. Secure HTTP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 307
Making HTTP Safe 307
Digital Cryptography 309
Table of Contents | ix
Symmetric-Key Cryptography 313
Public-Key Cryptography 315
Digital Signatures 317
Digital Certificates 319
HTTPS: The Details 322
A Real HTTPS Client 328
Tunneling Secure Traffic Through Proxies 335
For More Information 336
Part IV. Entities, Encodings, and Internationalization
15. Entities and Encodings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 341
Messages Are Crates, Entities Are Cargo 342
Content-Length: The Entity’s Size 344
Entity Digests 347
Media Type and Charset 348
Content Encoding 351
Transfer Encoding and Chunked Encoding 354
Time-Varying Instances 359
Validators and Freshness 360
Range Requests 363
Delta Encoding 365
For More Information 369
16. Internationalization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 370
HTTP Support for International Content 370
Character Sets and HTTP 371
Multilingual Character Encoding Primer 376
Language Tags and HTTP 384
Internationalized URIs 389
Other Considerations 392
For More Information 392
17. Content Negotiation and Transcoding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 395
Content-Negotiation Techniques 395
Client-Driven Negotiation 396
Server-Driven Negotiation 397
Transparent Negotiation 400
x | Table of Contents
Transcoding 403
Next Steps 405
For More Information 406
Part V. Content Publishing and Distribution
18. Web Hosting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 411
Hosting Services 411
Virtual Hosting 413
Making Web Sites Reliable 419
Making Web Sites Fast 422
For More Information 423
19. Publishing Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 424
FrontPage Server Extensions for Publishing Support 424
WebDAV and Collaborative Authoring 429
For More Information 446
20. Redirection and Load Balancing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 448
Why Redirect? 449
Where to Redirect 449
Overview of Redirection Protocols 450
General Redirection Methods 452
Proxy Redirection Methods 462
Cache Redirection Methods 469
Internet Cache Protocol 473
Cache Array Routing Protocol 475
Hyper Text Caching Protocol 478
For More Information 481
21. Logging and Usage Tracking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 483
What to Log? 483
Log Formats 484
Hit Metering 492
A Word on Privacy 495
For More Information 495
Table of Contents | xi
Part VI. Appendixes
A. URI Schemes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 499
B. HTTP Status Codes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 505
C. HTTP Header Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 508
D. MIME Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 533
E. Base-64 Encoding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 570
F. Digest Authentication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 574
G. Language Tags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 581
H. MIME Charset Registry . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 602
Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 617
HTTP The Definitive Guide 1st Edition David Gourley
xiii
Preface
The Hypertext Transfer Protocol (HTTP) is the protocol programs use to communi-
cate over the World Wide Web. There are many applications of HTTP, but HTTP is
most famous for two-way conversation between web browsers and web servers.
HTTP began as a simple protocol, so you might think there really isn’t that much to
say about it. And yet here you stand, with a two-pound book in your hands. If you’re
wondering how we could have written 650 pages on HTTP, take a look at the Table
of Contents. This book isn’t just an HTTP header reference manual; it’s a veritable
bible of web architecture.
In this book, we try to tease apart HTTP’s interrelated and often misunderstood
rules, and we offer you a series of topic-based chapters that explain all the aspects of
HTTP. Throughout the book, we are careful to explain the “why” of HTTP, not just
the “how.” And to save you time chasing references, we explain many of the critical
non-HTTP technologies that are required to make HTTP applications work. You can
find the alphabetical header reference (which forms the basis of most conventional
HTTP texts) in a conveniently organized appendix. We hope this conceptual design
makes it easy for you to work with HTTP.
This book is written for anyone who wants to understand HTTP and the underlying
architecture of the Web. Software and hardware engineers can use this book as a
coherent reference for HTTP and related web technologies. Systems architects and
network administrators can use this book to better understand how to design,
deploy, and manage complicated web architectures. Performance engineers and ana-
lysts can benefit from the sections on caching and performance optimization. Mar-
keting and consulting professionals will be able to use the conceptual orientation to
better understand the landscape of web technologies.
This book illustrates common misconceptions, advises on “tricks of the trade,” pro-
vides convenient reference material, and serves as a readable introduction to dry and
confusing standards specifications. In a single book, we detail the essential and inter-
related technologies that make the Web work.
xiv | Preface
This book is the result of a tremendous amount of work by many people who share
an enthusiasm for Internet technologies. We hope you find it useful.
Running Example: Joe’s Hardware Store
Many of our chapters include a running example of a hypothetical online hardware
and home-improvement store called “Joe’s Hardware” to demonstrate technology
concepts. We have set up a real web site for the store (http://www.joes-hardware.
com) for you to test some of the examples in the book. We will maintain this web site
while this book remains in print.
Chapter-by-Chapter Guide
This book contains 21 chapters, divided into 5 logical parts (each with a technology
theme), and 8 useful appendixes containing reference data and surveys of related
technologies:
Part I, HTTP: The Web’s Foundation
Part II, HTTP Architecture
Part III, Identification, Authorization, and Security
Part IV, Entities, Encodings, and Internationalization
Part V, Content Publishing and Distribution
Part VI, Appendixes
Part I, HTTP: The Web’s Foundation, describes the core technology of HTTP, the
foundation of the Web, in four chapters:
• Chapter 1, Overview of HTTP, is a rapid-paced overview of HTTP.
• Chapter 2, URLs and Resources, details the formats of uniform resource locators
(URLs) and the various types of resources that URLs name across the Internet. It
also outlines the evolution to uniform resource names (URNs).
• Chapter 3, HTTP Messages, details how HTTP messages transport web content.
• Chapter 4, Connection Management, explains the commonly misunderstood and
poorly documented rules and behavior for managing HTTP connections.
Part II, HTTP Architecture, highlights the HTTP server, proxy, cache, gateway, and
robot applications that are the architectural building blocks of web systems. (Web
browsers are another building block, of course, but browsers already were covered
thoroughly in Part I of the book.) Part II contains the following six chapters:
• Chapter 5, Web Servers, gives an overview of web server architectures.
• Chapter 6, Proxies, explores HTTP proxy servers, which are intermediary serv-
ers that act as platforms for HTTP services and controls.
• Chapter 7, Caching, delves into the science of web caches—devices that improve
performance and reduce traffic by making local copies of popular documents.
Preface | xv
• Chapter 8, Integration Points: Gateways, Tunnels, and Relays, explains gateways
and application servers that allow HTTP to work with software that speaks dif-
ferent protocols, including Secure Sockets Layer (SSL) encrypted protocols.
• Chapter 9, Web Robots, describes the various types of clients that pervade the
Web, including the ubiquitous browsers, robots and spiders, and search engines.
• Chapter 10, HTTP-NG, talks about HTTP developments still in the works: the
HTTP-NG protocol.
Part III, Identification, Authorization, and Security, presents a suite of techniques and
technologies to track identity, enforce security, and control access to content. It con-
tains the following four chapters:
• Chapter 11, Client Identification and Cookies, talks about techniques to identify
users so that content can be personalized to the user audience.
• Chapter 12, Basic Authentication, highlights the basic mechanisms to verify user
identity. The chapter also examines how HTTP authentication interfaces with
databases.
• Chapter 13, Digest Authentication, explains digest authentication, a complex
proposed enhancement to HTTP that provides significantly enhanced security.
• Chapter 14, Secure HTTP, is a detailed overview of Internet cryptography, digi-
tal certificates, and SSL.
Part IV, Entities, Encodings, and Internationalization, focuses on the bodies of HTTP
messages (which contain the actual web content) and on the web standards that
describe and manipulate content stored in the message bodies. Part IV contains three
chapters:
• Chapter 15, Entities and Encodings, describes the structure of HTTP content.
• Chapter 16, Internationalization, surveys the web standards that allow users
around the globe to exchange content in different languages and character sets.
• Chapter 17, Content Negotiation and Transcoding, explains mechanisms for
negotiating acceptable content.
Part V, Content Publishing and Distribution, discusses the technology for publishing
and disseminating web content. It contains four chapters:
• Chapter 18, Web Hosting, discusses the ways people deploy servers in modern
web hosting environments and HTTP support for virtual web hosting.
• Chapter 19, Publishing Systems, discusses the technologies for creating web con-
tent and installing it onto web servers.
• Chapter 20, Redirection and Load Balancing, surveys the tools and techniques for
distributing incoming web traffic among a collection of servers.
• Chapter 21, Logging and Usage Tracking, covers log formats and common
questions.
xvi | Preface
Part VI, Appendixes, contains helpful reference appendixes and tutorials in related
technologies:
• Appendix A, URI Schemes, summarizes the protocols supported through uni-
form resource identifier (URI) schemes.
• Appendix B, HTTP Status Codes, conveniently lists the HTTP response codes.
• Appendix C, HTTP Header Reference, provides a reference list of HTTP header
fields.
• Appendix D, MIME Types, provides an extensive list of MIME types and
explains how MIME types are registered.
• Appendix E, Base-64 Encoding, explains base-64 encoding, used by HTTP
authentication.
• Appendix F, Digest Authentication, gives details on how to implement various
authentication schemes in HTTP.
• Appendix G, Language Tags, defines language tag values for HTTP language
headers.
• Appendix H, MIME Charset Registry, provides a detailed list of character encod-
ings, used for HTTP internationalization support.
Each chapter contains many examples and pointers to additional reference material.
Typographic Conventions
In this book, we use the following typographic conventions:
Italic
Used for URLs, C functions, command names, MIME types, new terms where
they are defined, and emphasis
Constant width
Used for computer output, code, and any literal text
Constant width bold
Used for user input
Comments and Questions
Please address comments and questions concerning this book to the publisher:
O’Reilly & Associates, Inc.
1005 Gravenstein Highway North
Sebastopol, CA 95472
(800) 998-9938 (in the United States or Canada)
(707) 829-0515 (international/local)
(707) 829-0104 (fax)
Preface | xvii
There is a web page for this book, which lists errata, examples, or any additional
information. You can access this page at:
http://www.oreilly.com/catalog/httptdg/
To comment or ask technical questions about this book, send email to:
bookquestions@oreilly.com
For more information about books, conferences, Resource Centers, and the O’Reilly
Network, see the O’Reilly web site at:
http://www.oreilly.com
Acknowledgments
This book is the labor of many. The five authors would like to hold up a few people
in thanks for their significant contributions to this project.
To start, we’d like to thank Linda Mui, our editor at O’Reilly. Linda first met with
David and Brian way back in 1996, and she refined and steered several concepts into
the book you hold today. Linda also helped keep our wandering gang of first-time
book authors moving in a coherent direction and on a progressing (if not rapid) time-
line. Most of all, Linda gave us the chance to create this book. We’re very grateful.
We’d also like to thank several tremendously bright, knowledgeable, and kind souls
who devoted noteworthy energy to reviewing, commenting on, and correcting drafts
of this book. These include Tony Bourke, Sean Burke, Mike Chowla, Shernaz Daver,
Fred Douglis, Paula Ferguson, Vikas Jha, Yves Lafon, Peter Mattis, Chuck Neer-
daels, Luis Tavera, Duane Wessels, Dave Wu, and Marco Zagha. Their viewpoints
and suggestions have improved the book tremendously.
Rob Romano from O’Reilly created most of the amazing artwork you’ll find in this
book. The book contains an unusually large number of detailed illustrations that
make subtle concepts very clear. Many of these illustrations were painstakingly cre-
ated and revised numerous times. If a picture is worth a thousand words, Rob added
hundreds of pages of value to this book.
Brian would like to personally thank all of the authors for their dedication to this
project. A tremendous amount of time was invested by the authors in a challenge to
make the first detailed but accessible treatment of HTTP. Weddings, childbirths,
killer work projects, startup companies, and graduate schools intervened, but the
authors held together to bring this project to a successful completion. We believe the
result is worthy of everyone’s hard work and, most importantly, that it provides a
valuable service. Brian also would like to thank the employees of Inktomi for their
enthusiasm and support and for their deep insights about the use of HTTP in real-
world applications. Also, thanks to the fine folks at Cajun-shop.com for allowing us
to use their site for some of the examples in this book.
xviii | Preface
David would like to thank his family, particularly his mother and grandfather for
their ongoing support. He’d like to thank those that have put up with his erratic
schedule over the years writing the book. He’d also like to thank Slurp, Orctomi, and
Norma for everything they’ve done, and his fellow authors for all their hard work.
Finally, he would like to thank Brian for roping him into yet another adventure.
Marjorie would like to thank her husband, Alan Liu, for technical insight, familial
support and understanding. Marjorie thanks her fellow authors for many insights
and inspirations. She is grateful for the experience of working together on this book.
Sailu would like to thank David and Brian for the opportunity to work on this book,
and Chuck Neerdaels for introducing him to HTTP.
Anshu would like to thank his wife, Rashi, and his parents for their patience, sup-
port, and encouragement during the long years spent writing this book.
Finally, the authors collectively thank the famous and nameless Internet pioneers,
whose research, development, and evangelism over the past four decades contrib-
uted so much to our scientific, social, and economic community. Without these
labors, there would be no subject for this book.
PART I
HTTP: The Web’s Foundation
This section is an introduction to the HTTP protocol. The next four chapters
describe the core technology of HTTP, the foundation of the Web:
• Chapter 1, Overview of HTTP, is a rapid-paced overview of HTTP.
• Chapter 2, URLs and Resources, details the formats of URLs and the various
types of resources that URLs name across the Internet. We also outline the evo-
lution to URNs.
• Chapter 3, HTTP Messages, details the HTTP messages that transport web
content.
• Chapter 4, Connection Management, discusses the commonly misunderstood
and poorly documented rules and behavior for managing TCP connections by
HTTP.
HTTP The Definitive Guide 1st Edition David Gourley
3
CHAPTER 1
Overview of HTTP
The world’s web browsers, servers, and related web applications all talk to each
other through HTTP, the Hypertext Transfer Protocol. HTTP is the common lan-
guage of the modern global Internet.
This chapter is a concise overview of HTTP. You’ll see how web applications use
HTTP to communicate, and you’ll get a rough idea of how HTTP does its job. In
particular, we talk about:
• How web clients and servers communicate
• Where resources (web content) come from
• How web transactions work
• The format of the messages used for HTTP communication
• The underlying TCP network transport
• The different variations of the HTTP protocol
• Some of the many HTTP architectural components installed around the Internet
We’ve got a lot of ground to cover, so let’s get started on our tour of HTTP.
HTTP: The Internet’s Multimedia Courier
Billions of JPEG images, HTML pages, text files, MPEG movies, WAV audio files,
Java applets, and more cruise through the Internet each and every day. HTTP moves
the bulk of this information quickly, conveniently, and reliably from web servers all
around the world to web browsers on people’s desktops.
Because HTTP uses reliable data-transmission protocols, it guarantees that your data
will not be damaged or scrambled in transit, even when it comes from the other side of
the globe. This is good for you as a user, because you can access information without
worrying about its integrity. Reliable transmission is also good for you as an Internet
application developer, because you don’t have to worry about HTTP communications
4 | Chapter 1: Overview of HTTP
being destroyed, duplicated, or distorted in transit. You can focus on programming
the distinguishing details of your application, without worrying about the flaws and
foibles of the Internet.
Let’s look more closely at how HTTP transports the Web’s traffic.
Web Clients and Servers
Web content lives on web servers. Web servers speak the HTTP protocol, so they are
often called HTTP servers. These HTTP servers store the Internet’s data and provide
the data when it is requested by HTTP clients. The clients send HTTP requests to
servers, and servers return the requested data in HTTP responses, as sketched in
Figure 1-1. Together, HTTP clients and HTTP servers make up the basic compo-
nents of the World Wide Web.
You probably use HTTP clients every day. The most common client is a web
browser, such as Microsoft Internet Explorer or Netscape Navigator. Web browsers
request HTTP objects from servers and display the objects on your screen.
When you browse to a page, such as “http://www.oreilly.com/index.html,” your
browser sends an HTTP request to the server www.oreilly.com (see Figure 1-1). The
server tries to find the desired object (in this case, “/index.html”) and, if successful,
sends the object to the client in an HTTP response, along with the type of the object,
the length of the object, and other information.
Resources
Web servers host web resources. A web resource is the source of web content. The
simplest kind of web resource is a static file on the web server’s filesystem. These
files can contain anything: they might be text files, HTML files, Microsoft Word
files, Adobe Acrobat files, JPEG image files, AVI movie files, or any other format you
can think of.
However, resources don’t have to be static files. Resources can also be software pro-
grams that generate content on demand. These dynamic content resources can gen-
erate content based on your identity, on what information you’ve requested, or on
Figure 1-1. Web clients and servers
HTTP request
“Get me the document called /index.html.”
Client Server
www.oreilly.com
HTTP response
“Okay,here it is,it’s in HTML format and is 3,150 characters long.”
Resources | 5
the time of day. They can show you a live image from a camera, or let you trade
stocks, search real estate databases, or buy gifts from online stores (see Figure 1-2).
In summary, a resource is any kind of content source. A file containing your com-
pany’s sales forecast spreadsheet is a resource. A web gateway to scan your local
public library’s shelves is a resource. An Internet search engine is a resource.
Media Types
Because the Internet hosts many thousands of different data types, HTTP carefully
tags each object being transported through the Web with a data format label called a
MIME type. MIME (Multipurpose Internet Mail Extensions) was originally designed
to solve problems encountered in moving messages between different electronic mail
systems. MIME worked so well for email that HTTP adopted it to describe and label
its own multimedia content.
Web servers attach a MIME type to all HTTP object data (see Figure 1-3). When a
web browser gets an object back from a server, it looks at the associated MIME type
to see if it knows how to handle the object. Most browsers can handle hundreds of
popular object types: displaying image files, parsing and formatting HTML files,
playing audio files through the computer’s speakers, or launching external plug-in
software to handle special formats.
Figure 1-2. A web resource is anything that provides web content
Client Server
Internet
E-commerce
gateway
Realestatesearch
gateway
Stocktrading
gateway
Webcam
gateway
11000101101
Imagefile
Textfile
Filesystem Resources
Exploring the Variety of Random
Documents with Different Content
foot and horseback, as well as evolutions by bodies of troops in
close formation.
In describing the unveiling of the statue, as well as the funeral of
King Edward VII, I have concerned myself purposely with the
externals and pomp that are characteristic of such occasions in
England. They show that, in a land under parliamentary rule, a so-
called democratic land, more importance is attached to well-nigh
mediæval magnificence than in the young German Empire.
The French actions in Morocco, which were no longer such as could
be reconciled with the Algeciras Agreement, had once more engaged
the attention of the diplomats. For this reason the Chancellor had
requested me to find out, as soon as opportunity should arise, what
King George thought about the situation.
I asked him if he thought that the French methods were still in
accordance with the Algeciras Agreement. The King remarked that
the agreement, to tell the truth, no longer was in force, and that the
best thing to do would be to forget it; that the French,
fundamentally, were doing nothing different in Morocco from what
the English had previously done in Egypt; that, therefore, England
would place no obstacles in the path of the French, but would let
them alone; that the thing to do was to recognize the "fait accompli"
of the occupation of Morocco and make arrangements, for
commercial protection, with France.
To the very end the visit went off well, and the inhabitants of
London, of all social strata, expressed their good will every time the
guests of their King showed themselves.
Thus the German Imperial couple was enabled to return home with
the best of impressions. When I informed the Chancellor of these, he
expressed great satisfaction. From the remarks of King George he
drew the inference that England considered the Algeciras Agreement
no longer valid and would not place any obstacles in the way of the
French occupation of Morocco.
From this the policy followed by him and the Foreign Office arose
which led to the Agadir case, the last and equally unsuccessful
attempt to maintain our influence in Morocco. The situation became
more serious during the Kiel regatta week. The Foreign Office
informed me of its intention to send the Panther to Agadir. I gave
expression to strong misgivings as to this step, but had to drop them
in view of the urgent representations of the Foreign Office.
In the first half of 1912 came the sending of Sir Ernest Cassel with a
verbal note in which England offered to remain neutral in case of an
"unprovoked" attack upon Germany, provided Germany agreed to
limit her naval construction program and to drop her new Naval bill,
the latter being darkly hinted at. Owing to our favorable answer to
this Lord Haldane was intrusted with the negotiations and sent to
Berlin. The negotiations finally fell through, owing to the constantly
more uncompromising attitude of England (Sir E. Grey), who finally
disavowed Lord Haldane and withdrew his own verbal note, because
Grey was afraid to offend the French by a German-English
agreement and jeopardize the Anglo-French-Russian understanding.
Here are the details of the case:
On the morning of January 29, 1912, Herr Ballin had himself
announced to me at the palace in Berlin and asked for an audience.
I assumed that it was a case of a belated birthday greeting,
therefore I was not a little astonished when Ballin, after a short
speech of congratulation, said that he had come as an emissary of
Sir Ernest Cassel, who had just arrived in Berlin on a special mission
and wished to be received.
I asked whether it was a political matter, and why, if so, the meeting
had not been arranged through the English ambassador. Ballin's
answer was to the effect that, from hints dropped by Cassel, he
knew the matter to be of great importance, and the explanation for
Cassel's acting without the intervention of the ambassador was
because the earnest desire had been expressed in London that the
official diplomatic representatives, both the English and the German,
should not be apprised of the affair.
I declared that I was ready to receive Cassel at once, but added
that, should his mission have to do with political questions, I should
immediately summon the Chancellor, since I was a constitutional
monarch and not in a position to deal with the representative of a
foreign power alone without the Chancellor.
Ballin fetched Cassel, who handed me a document which, he stated,
had been prepared with the "approval and knowledge of the English
Government." I read the short note through and was not a little
surprised to see that I was holding in my hand a formal offer of
neutrality in case Germany became involved in future warlike
complications, conditioned upon certain limitations in the carrying
out of our program of naval construction, which were to be the
subject of mutual conferences and agreements. Walking with Ballin
into the next room, I handed over the document for him to read.
After he had done so both of us exclaimed in the same breath: "A
verbal note!"
It was plainly apparent that this "verbal note" was aimed at the
forthcoming addition to our Naval law and designed in some way to
delay or frustrate it. No matter how the matter was interpreted, I
found myself confronted with a peculiar situation, which also amazed
Ballin. It reminded me of the situation at Cronberg-Friedrichshof in
1905, when I was obliged to decline the demand, made to me
personally by the English Under Secretary, Hardinge, that we should
forego our naval construction.
SURPRISE AT BRITISH NOTE
Now, an intimate business friend of Edward VII appears, without
previous announcement through official diplomatic channels, before
the German Emperor with a "verbal note" inspired by the English
Government, with explicit instructions to evade all the diplomatic
officials of both countries. He hands over an offer from the English
Government to maintain neutrality in future warlike complications
provided certain agreements regarding limitation of naval
construction are made. And this is done by England, the mother of
"Constitutionalism"! When I pointed this out to Ballin, he exclaimed:
"Holy Constitutionalism! What has become of you? That is 'personal
politics' with a vengeance!"
I agreed with Ballin to send at once for Herr von Bethmann, in order
that he might learn what was transpiring and decide what to do in
this peculiar situation.
Bethmann was called up on the telephone and soon appeared. At
first the situation aroused in him likewise a certain degree of
astonishment; it was interesting to watch the play of expression on
his face as he was told about the matter. The Chancellor suggested
that Grand Admiral von Tirpitz also be summoned, for the proper
dispatching of the business, and recommended that an answer be
drawn up in English, in the same manner and form as the note
delivered by Cassel, and that it be handed to Sir Ernest, who wished
to return home that night. (English was chosen because there was
fear of obscurity and misunderstanding if the note were translated in
London.) The Chancellor asked me to draw up the note, since I
knew English best. After some objection I had to make up my mind
to be myself the writer of the answer.
And now the following scene took place:
I sat at the writing table in the adjutant's room; the other gentlemen
stood around me. I would read a sentence from the note aloud and
sketch out an answer, which was, in turn, read aloud. Then criticisms
were made from right and left: one thought the sentence too
complaisant, another too abrupt; it was thereupon remodeled,
recast, improved, and polished. The Chancellor particularly subjected
my grammar and style to much torture, owing to his habit of probing
things philosophically, to his methods of profound thoroughness,
which caused him to be most particular with every word, in order
that it, having been studied from every angle, should later on afford
nobody cause for criticism.
After hours of work the note was finally finished and, having been
passed a couple of times from hand to hand and then read aloud by
me half a dozen times more, it was signed.
When our group broke up, the Chancellor asked Sir Ernest who was
to be expected from England to conduct the negotiations. Cassel
replied that it would certainly be a Minister, which one he did not
know—perhaps Mr. Winston Churchill, Minister of the Navy, since the
question was a naval one. Then the Chancellor arranged further with
him that the unofficial method should be retained and that Ballin
should undertake to transmit all the news regarding the matter
which should emanate from England.
Sir Ernest expressed his lively gratitude for his cordial reception and
his satisfaction at the tenor of our reply. Later Ballin informed me
from his hotel that Cassel had expressed himself as completely
satisfied over the successful outcome of his mission, and that he
would report to his Government the good impression made upon
him.
When I thereupon conferred on the matter with Admiral von Tirpitz
we both agreed that the Naval bill was in danger and, therefore, that
we must be very careful.
DIPLOMATIC PREPAREDNESS
In perfect secrecy the material was collected which Admiral von
Tirpitz was to present at the negotiations; it consisted of a short
historical sketch of the development of the fleet and of the
increasingly difficult tasks devolving upon it; the Naval law and its
aims, nature, enactment, and extension; finally, the contemplated
Naval bill, its meaning and the method of putting it through.
The Chancellor asked that the main negotiations should be
conducted at the palace in my presence. In addition, I agreed with
Admiral von Tirpitz that he should speak English, as far as possible,
and that I, in case of difficult technical expressions, would interpret.
Until England made known the name of the negotiator, our time was
spent in suppositions, and Ballin informed us of combinations in
connection with which a number of names, even that of Grey, came
up.
At last the news arrived, through Ballin, that Haldane—the Minister
of War, previously a lawyer—had been intrusted with the conduct of
the negotiations and would soon arrive. General amazement! Just
imagine, "mutatis mutandis," that Germany had sent her Minister of
War (at that time von Heeringen) to London, instead of Admiral von
Tirpitz, for the discussion of a naval matter!
When this point was discussed with Bethmann and Tirpitz a number
of suppositions were advanced; the Chancellor said that Haldane
was known in England as a student of Goethe and as a man versed
in German philosophy and knowing the German language, so that
his choice was a piece of politeness toward us. Tirpitz observed that
Haldane had formerly spent some time in Berlin and worked with
General von Einem at the War Ministry, and hence knew the state of
affairs in Germany. I suggested that all that was very well, but that
the choice of Haldane showed that England looked upon the
question as purely political, since he knew only superficially about
naval affairs; that the whole thing was probably directed against
Germany's naval policy in general and the new Naval bill in
particular; that it would be well, therefore, not to forget this, in
order that the whole thing might not develop into a foreign assault
upon our right of self-determination as to the strength of our
defensive measures.
Haldane arrived and was received as an Imperial guest. Ballin, who
accompanied him, solved the riddle of Haldane's choice on the basis
of information received by him from England.
He said that when Cassel had got back to London, reported on his
reception, and handed over the German reply, the impression made
was so favorable that no further doubt was entertained there as to
the satisfactory course of the negotiations and their conclusion in
the form of an agreement; that, thereupon a keen dispute had
arisen among the Ministers, especially between Churchill and Grey,
as to who should go to Berlin and affix his name to this great
historical document, in case the object should be achieved of making
Germany completely give up the further development of her fleet;
that Churchill thought himself the right man for the job, since he
was at the head of the navy. But Grey and Asquith would not let
their colleague reap the glory, and, for this reason, Grey stood for a
while in the foreground—another proof that it was politics rather
than the number of ships which was to play the leading rôle.
SELECTION OF CHURCHILL
After a while, however, it was decided that it was more fitting to
Grey's personal and official importance to appear only at the
termination of the negotiations, to affix his name to the agreement,
and—as it was put in the information transmitted from England to
Ballin—"to get his dinner from the Emperor and to come in for his
part of the festivities and fireworks"—which, in good German, means
to enjoy the "Bengal light illumination."
As it had been decided that Churchill was not to get this in any
event, it was necessary to choose somebody for the negotiations
who was close to Asquith and Grey and who, possessing their
complete confidence, was willing to conduct the negotiations as far
as the beginning of the "fireworks"; one who, moreover, was already
known at Berlin and not a stranger in Germany. Churchill, to be sure,
qualified in this, for he had been present a few times at the Imperial
maneuvers in Silesia and Württemberg as a guest of the Emperor.
Ballin guaranteed the reliability of his London source of information.
Before the negotiations began I once more pointed out to Secretary
of State von Tirpitz that Haldane, in spite of being just then Minister
of War, probably had prepared himself for his task, and had surely
received careful instructions from the English Admiralty, in which the
spirit of Fisher was paramount. In his Handbook for English Naval
Officers, Fisher had stated, among other precepts well worthy of
being remembered, one which is characteristic of the Admiral, his
department and its spirit, which runs, word for word, as follows: "If
you tell a lie, stick to it."
Moreover, I said to Tirpitz, we must not forget what an amazing
adaptability the Anglo-Saxons had, which fitted them for occupying
positions which had no relation to their previous life and training.
Furthermore, the interest in England in the navy was generally so
intense that almost every educated man was an expert up to a
certain point on naval questions.
In the course of the negotiations Haldane proved himself admirably
well informed and a skillful, tenacious debater, and his brilliant
qualities as a lawyer came to the fore. The conversation lasted
several hours, and brought about a general clarifying, as well as a
preliminary agreement as to postponement of time limits of ship
construction, etc. The details concerning it are deposited in
documents at the Imperial Naval Office. Tirpitz was splendid.
After some more conferences—at which, likewise, Ballin was present
—Haldane returned to England. Ballin informed me that Haldane had
expressed himself to him as entirely satisfied with the outcome of his
mission, and had stated that in about a week or two the first draft of
the agreement could be sent to us.
Time passed—the date set for the introduction of the Naval bill
approached. Tirpitz suggested, in case the agreement were
concluded previously, that the Naval bill be altered accordingly;
otherwise, that it be introduced without alteration.
SUSPECTS ENGLISH PURPOSES
At last we received, not the draft of the agreement, but a document
asking all sorts of questions and expressing a desire for all sorts of
data, a reply to which required many consultations and much
reflection. Little by little the suspicion grew in me that the English
were not in earnest with regard to the agreement, since question
followed question and details were sought which had nothing
directly to do with the agreement. England withdrew more and more
from her promises, and no draft of the agreement came to hand.
In Berlin a big agitation set in against the Naval bill, Tirpitz and
myself on the part of the Foreign Office, and from other quarters,
both qualified and unqualified. The Chancellor also, who hoped to
achieve the agreement and affix his name to a document which
would free Germany from "encirclement" and bring her into a regular
and better relationship with England, came out in favor of dropping
the Naval bill. But that would simply have meant allowing a foreign
power enormous influence in matters of German national defense
and jeopardizing thereby the national right of self-determination and
our readiness for battle in case of a war being forced upon us. Had
we allowed this it would have amounted to our consenting to permit
England, Germany's principal foe, to grant us whatever she wished,
after consulting her own interests, without receiving ourselves the
guaranty of any equivalent concession.
In this confused state of affairs differences of opinion and violent
disputes arose, which, especially in those circles which really knew
little about the navy, were conducted with much violence and not
always in a practical manner. Admiral von Tirpitz, all through that
winter, which was so hard a one for him and me, fought his fight like
a genuine, patriotic officer, realizing the situation and seeing through
his opponents with clear vision and supporting me with complete
conviction to the limit of his ability. All the Government officials
agreed that no foreign country could be allowed any voice in helping
decide what we had or had not to do toward insuring our protection.
The hope of bringing about the agreement grew ever fainter;
England continually showed lessening interest and kept eliminating
important parts of her original verbal note. And so it came about
that Admiral von Tirpitz and I realized that the whole proposal was
merely a "maneuver."
The fight over the German Naval bill grew steadily hotter. I
happened at this time to meet at Cuxhaven Doctor von Burchard,
President of the Hamburg Senate, whom I respected greatly, as he
was the very model of an aristocratic citizen of a Hanseatic city, and
who had often been consulted by me in political matters. I described
to him the entire course of the affair and the disputes in Berlin as to
the introduction or nonintroduction of the bill, and asked him then to
tell me, with his usual complete frankness, what he thought the right
thing to do in the interest of the national welfare, since I greatly
desired to hear an objective opinion, uninfluenced by the rival camps
of Berlin.
Doctor Burchard replied in his clear, keen, pointed, convincing
manner that it was my duty toward the people and the fatherland to
stick to the bill; that whosoever spoke against its introduction was
committing a sin against them; that whatever we thought necessary
to our defense must be unconditionally brought into being; that,
above all else, we must never permit a foreign country to have the
presumption to interfere with us; that the English offer was a feint to
make us drop the Naval bill; that this must, in no circumstances, be
allowed; that the German nation would not understand why its right
of self-determination had been sacrificed; that the bill must
unquestionably be introduced; that he would work in its favor in the
Federal Council (as indeed he did in a brilliant, compelling speech)
and also otherwise press its acceptance in Berlin; that the English
would naturally resort to abuse, but that this made no difference,
since they had been doing so for a long time; that they certainly
would not get into a war for such a cause; that Admiral von Tirpitz
was merely doing his duty and fulfilling his obligations, and that I
should support him in every way; that the Chancellor must give up
opposing the measure, otherwise he would run the risk of finally
forfeiting public esteem on account of being "pro-English."
Thus spoke the representative of the great commercial city, which
was threatened before all others in case of war with England. The
genuine Hanseatic spirit inspired his words.
Strangely enough, this opinion of Doctor Burchard concerning the
English offer has recently been corroborated to me in Holland by a
Dutchman who heard from Englishmen at that time the English point
of view. I and Tirpitz guessed right—the offer of neutrality, in case
naval expansion was curbed, was a political maneuver.
COUNTERCHARGES OF CHEATING
Soon news also came from Ballin that the matter was not going well
in England: that, according to information received, a dispute had
arisen about the agreement; that there was dissatisfaction with
Haldane, who, it was said, had let himself be cheated by Tirpitz! This
was plain evidence of the indignation felt because Tirpitz had not
walked into the trap and simply let the bill drop, and that Haldane
had been unable to serve up the bill to the English Cabinet on a
platter at tea time. It is useless to say that there was any "cheating"
on Germany's part, but the reproach leveled at Haldane justifies the
suspicion that his instructions were that he should seek to "cheat"
the Germans. Since his fellow countrymen thought that the reverse
was true, one can but thank Admiral von Tirpitz most sincerely for
having correctly asserted the German standpoint to the benefit of
our fatherland.
Toward the end of March the fight about the bill took on such
violence that finally the Chancellor, on the 22d, asked me for his
dismissal as I stepped out of the vault in the Charlottenburg Park.
After long consultation and after I had told him Doctor Burchard's
view, the Chancellor withdrew his request.
When, some time afterward, I paid a visit to Herr von Bethmann in
his garden, I found him quite overcome and holding in his hand a
message from London. It contained the entire disavowal of the
verbal note delivered by Cassel, the withdrawal of the offer of
neutrality, as well as of every other offer, and at the end the advice
that I dismiss Herr von Bethmann from the Imperial Chancellorship,
since he enjoyed to a marked degree the confidence of the British
Government! Tears of anger shone in the eyes of the Chancellor,
thus badly deceived in his hopes; the praise accorded to him by a
foreign government with which Germany and he had just had such
painful experiences hurt him deeply. For the second time he offered
me his resignation; I did not accept it, but sought to console him. I
then ordered that the ambassador in London be asked how he could
have accepted and forwarded such a message under any conditions.
Now the Chancellor was in favor of the bill, but it was honorably
proposed with the limitation which it had been decided to impose
upon it in case of the conclusion of the agreement. In England, on
the other hand, the full naval construction program was carried out.
This "Haldane episode" is characteristic of England's policy. This
whole maneuver, conceived on a large scale, was engineered for the
sole purpose of hampering the development of the German fleet,
while, simultaneously, in America, which had an almost negligible
merchant fleet; in France, whose navy was superior in numbers to
the German; in Italy, in Russia, which also had ships built abroad—
vast construction programs were carried out without eliciting one
word of protest from England. And Germany, wedged in between
France and Russia, certainly had to be at least prepared to defend
herself on the water against those nations.
DEFENDS NAVAL PROGRAM
For this our naval construction program was absolutely necessary; it
was never aimed against the English fleet, four or five times as
strong as ours, and assuring England's superiority and security, to
equal the strength of which no sensible man in Germany ever
dreamed. We needed our fleet for coast defense and the protection
of our commerce; for this purpose the lesser means of defense, like
U-boats, torpedo boats, and mines, were not sufficient. In addition
the coast batteries on the Baltic were so antiquated and miserably
equipped that they would have been razed within forty-eight hours
by the massed fire of the heavy guns of modern battleships. Thus,
our Baltic coast was practically defenseless. To protect it the fleet
was necessary.
The Skagerrak (Jutland) battle has proved what the fleet meant and
what it was worth. That battle would have meant annihilation for
England if the Reichstag had not refused up to 1900 all proposals for
strengthening the navy. Those twelve lost years were destined never
to be retrieved.
Before we take our leave of Haldane I wish to touch upon another
episode in his activities. In 1906 he came, with the permission of the
German Government, to Berlin, to inform himself concerning the
Prussian defense conditions, recruiting, General Staff, etc. He busied
himself at the Ministry of War, where the Minister, General von
Einem, personally gave him information. After about two or three
weeks' work there he returned, well satisfied, to England.
When, after the outbreak of the World War, the "pro-German"
Haldane, the friend of Goethe, was boycotted and treated with such
hostility that he could no longer show himself in public, he had a
defense written of his term of office as Minister of War by the well-
known littérateur and journalist, Mr. Begbie, entitled Vindication of
Great Britain. Therein his services toward forming a regular General
Staff and preparing the British army for the World War are placed in
a bright light and emphasis is laid on the skill with which he utilized
the permission obtained from the Prussian War Ministry in order to
learn in Germany about military matters and to reorganize the British
army and General Staff, to the minutest detail and on the German
model, for the coming war against the erstwhile German hosts.
Here we see the sly, adroit lawyer, who, sheltered under the
hospitality of a foreign country, studies its military arrangements in
order to forge weapons against it out of the material and knowledge
thus acquired. Quite characteristically the book is dedicated to King
Edward VII, whose intimate, emissary, and tool Haldane was. In
those days Berlin saw in Haldane's mission a "rapprochement" with
England, toward which Germans were always bending their efforts;
in reality, however, it was a "reconnoitering expedition" under the
very roof of the German cousin. England showed her gratitude by
the World War, which Haldane helped to prepare; in this case
Haldane "cheated" the Germans!
That is the history of the Haldane mission. Later it was summarily
maintained by all sorts of ignorant dabblers in politics, belonging to
the press and the general public, that the promising
"rapprochement" with England through Haldane had been wrecked
by the obstinacy of the Emperor and Admiral von Tirpitz and by their
clinging to the Naval bill against the wishes of all "sensible
counselors!"
KINGSHIP OF ALBANIA
At that time [in 1912] the question of the establishment of an
independent Albanian state and the choice by the Powers of a head
for it, was brought to my attention also. A number of candidates
lusting for a crown had already presented themselves before the
tribunal of the Powers, without getting themselves accepted; a
number of candidates, considered by the Powers, were declined by
the Albanians. I looked upon the matter in itself with indifference,
and was of the opinion that—as in the case of every "creation of a
nation"—the greatest possible attention should be paid to historical
development, also to geographical peculiarities and the customs of
the inhabitants.
In this peculiar land there has never been any united nation under
one ruler and one dynasty. In valleys, encircled and cut off by high
mountain ranges, the Albanian tribes live separated to a
considerable degree from one another. Their political system is not
unlike the clan system of the Scotch. Christians and Mohammedans
are represented in equal numbers.
The custom of "vendetta" is an ancient one, sanctified by tradition,
which is no less true of robbery and cattle stealing. Agriculture is still
in a backward stage of development, farming is in its infancy, the
implements used therein date from before the flood.
The head man of the clan dispenses justice in the open, under the
village tree, as it used to be done once upon a time among the
ancient Germans. Every man is armed and most are excellent shots.
Whenever the head man of the clan turns up while on a horseback
tour through his territory in some hamlet, the inhabitants expect a
blessing from him in the form of jingling coins, which sometimes are
scattered about by him from the saddle. This, of course, is
particularly customary at the outset of a new Government's term,
and great is the dissatisfaction when it does not happen.
Up to the time of the Balkan War many Albanians entered the
Turkish service, where they rose to high importance, being greatly
prized on account of their diligence and keen intelligence, as well as
their tenacious energy. They supplied the Turkish administration with
a large number of officials, also with a certain percentage in the
diplomatic corps and the army. The young Albanian nobles were
proud to serve in a splendid company of palace guards of the Sultan,
which scarcely had an equal for size, martial appearance, and manly
beauty. These were partly relatives of the Sultan, since the latter
used to have noble Albanian women of the principal clans in his
harem in order that he—protected by blood brotherhood—might be
safe from the "vendettas" of the clans, and, also, that he might find
out everything that might serve to influence the feelings of the
Albanian chieftains. The desires of the Albanians which reached him
by this road—for instance, as to supplies of arms and ammunition,
school houses, building of highways, etc.—were thereupon granted
in an inconspicuous manner. Thus the Sultan was enabled to keep
the usually turbulent Albanians quiet and loyal by means of "family
ties."
With this knowledge of the state of affairs as a foundation, I sought
to bring my influence to bear toward having a Mohammedan Prince
chosen, if possible—perhaps an Egyptian Prince—not forgetting that
he should have a well-lined purse, which is an absolute necessity in
Albania. My advice was not heeded by the "Areopagus of the
Powers," whose members were not bothering themselves with the
interests of the Albanians, but seeking, first of all, for pretexts and
opportunities for fishing in the troubled Albanian waters in such a
way as to benefit their own countries.
OPPOSED CHOICE OF GERMAN
Therefore, I was not at all pleased when the choice fell upon Prince
William of Wied. I esteemed him as a distinguished, knightly man of
lofty sentiments, but considered him unfitted for the post. The Prince
knew altogether too little about Balkan affairs to be able to
undertake this thorny task with hope of success. It was particularly
unpleasant to me that a German Prince should make a fool of
himself there, since it was apparent from the start that the Entente
would place all sorts of obstacles in his path. Upon being questioned
by the Prince, I told my cousin all my doubts, laying stress upon the
difficulties awaiting him, and advised him urgently to decline. I could
not command him, since the Prince of Wied, as head of the family,
had the final word in the matter.
After the Prince's acceptance of the candidacy offered him by the
Powers, I received him in the presence of the Chancellor. A certain
irresolution in the bearing of the Prince, who contemplated his new
task with anything but enthusiasm, strengthened the resolve in me
and the Chancellor to try hard once more to dissuade the young
candidate from ascending the recently invented Albanian "throne."
But in vain. The ambitious, mystically excited wife of the Prince saw
in Albania the fulfillment of her wishes. And "ce que femme veut,
Dieu le veut" ("what woman wishes, God wishes").
Carmen Sylva [the Queen of Rumania] also worked toward having
him accept; she went so far, in fact, as to publish an article in the
newspapers beginning "Fairyland Wants Its Prince."
So even the best meant warnings were useless. I had also strongly
advised the Prince not to go to Albania before the settlement of the
financial question, since the reasons which had led me to suggest
the selection of a rich ruler now came to the fore. The Prince was
not very wealthy and the Powers had to supply him with a
"donation," concerning the amount of which, and the method of
paying it by installments, an unpleasant quarrel arose. At last a part
payment was made.
Danger lurked for the Prince and his eventual Government in the
person of Essad Pasha, an unreliable, intriguing, greedy soldier of
fortune, who himself had designs on the Albanian throne and held
sway over a certain number of armed adherents. From the start he
was an opponent of the new Prince and he plotted secretly with
Italy, which was not favorably inclined toward the Prince of Wied.
Now, it would have been quite natural and a matter of course if the
new ruler had taken with him in his suite men from Germany whom
he knew and who were faithful to him. But he did not. An
Englishman and an Italian were attached to his person as
"secretaries" and they had nothing better to do than to work against
his interests, to give him bad advice and to intrigue against him.
REQUIREMENTS OF A RULER
During the time that the Prince of Wied was making his preparations
the excellently written pamphlet of an Austrian General Staff officer,
dealing with his travels in Albania, appeared. The officer described,
in a lively and clear style, the geographical and climatic drawbacks,
the population and customs, the general poverty and backwardness
of the land.
He pointed out that a future ruler of the land must in no
circumstances reside on the coast, but must show himself to the
inhabitants and travel about in the country. Owing to the primitive
means of transportation, he went on, the lord of the land must sit all
day on horseback and ride through his domain, having at his saddle
bow the famous "bag of sequins" mentioned in all Oriental tales and
legends, in order to sway public opinion in his favor in the places
visited by the expected shower of gold. The ruler must be sure, the
author continued, to bind some of the clans of the region closely to
himself, so as to have at his beck and call an armed force for
asserting his will and overcoming any opponents wishing to rebel,
since this was the only way to maintain his power, in view of the
utter lack of "troops" or an "army" in the European sense of the
word.
This meant that the ruler of Albania must lead at first a nomadic,
horseback life, and, in addition, provide himself with a wandering
camp, with tents and other accessories and the necessary horses.
Plenty of men adapted to this sort of life might have been found in
his squadron of the Third Guard Uhlan Regiment, since many of his
Uhlans, who were very fond of the Prince, had declared that they
were ready to accompany him as volunteers. Surely, they would
have served him better and been more useful to him than what he
did in preparing to take over the overlordship of Albania, without
knowledge of the country.
I advised my cousin urgently to study this pamphlet and to follow its
recommendations, especially with regard to his residence, which
should be fixed at some point as far as possible from the warships of
the Powers, in order that he might not be forced to act under their
pressure and arouse suspicion among the Albanians that their ruler
needed these ships for protection against his subjects. Did the Prince
ever read the pamphlet? In any event, the course adopted by him
subsequently was contrary to its advice and the advice given him by
me.
The Prince and his wife journeyed to Albania, and things turned out
as I had foreseen. According to reports describing the arrival of the
sovereign couple, the Princess, although she was a German,
addressed the assembled Albanians from her balcony in French,
since they understood no German! The "court" remained at Durazzo
under the guns of the foreign ships. The Prince did not travel on
horseback through the land, nor did he scatter gold sequins about—
not even from his balcony on the day of his arrival—nor did he push
Essad out of the way. So the adventure ended as one might imagine.
I have gone into some detail in describing my opinion and attitude
toward the question of the choice of the ruler of Albania because,
from every possible quarter, false rumors have been circulated for
the purpose of imputing to me motives which were utterly foreign to
me. In this matter, also, I gave honest advice when questioned,
based on sound knowledge of mankind.
The year 1912 also witnessed the meeting with the Tsar at Baltisch-
Port, whither I repaired on board my yacht at the invitation of
Nicholas II. Our two yachts anchored side by side, so that visiting
from ship to ship was easy. The Tsar, his children, and his entire
entourage vied with one another in evidences of good will and
hospitality. The Russian and German escorting squadrons were
inspected, turn and turn about, by the Tsar and myself together, and
we took our meals either at the Tsar's table or mine.
We spent one morning on land near Baltisch-Port. The Eighty-fifth
"Viborg" Infantry Regiment, whose commander I was, had been
drawn up in a field and was inspected first in parade formation, then
in company and battalion exercises, which were carried out in as
satisfactory a manner as was the parade with which the evolutions
were brought to a close.
The regiment, composed of four battalions, made an excellent
impression. It was in field equipment—brown-gray blouses and caps
—and the latter, worn jauntily cocked over one ear by all, gave to
the sun-browned, martial faces of the strong young soldiers a bold
air which brought joy to the heart of every soldier who gazed upon
them.
In the course of the brilliant and uncommonly amiable reception
which I met with on this occasion I received no hint of the Balkan
alliance, concluded a short time before.
It was my last visit in Russia before the outbreak of the war.
CHAPTER VI
My Co-workers in the
Administration
It behooves me to remark that I found particular pleasure in working
with His Excellency von Stephan and in dealing with him. He was a
man of the old school, who fitted in so well with me that he always
grasped my ideas and suggestions and afterward carried them out
with energy and power, owing to his firm belief in them. A man of
iron energy and unflagging capacity for work and joyousness;
endowed, moreover, with refreshing humor, quick to perceive new
possibilities, never at a loss for expedients, well versed in political
and technical matters, he seemed to have been born especially for
creative co-operation. I trusted him implicitly, and my trust in him
was never betrayed. I learned much from my association with this
stimulating, shrewd counselor.
The Post-Office Department reached an unimagined degree of
excellence and aroused the admiration of the whole world. The great
invention of the telephone was utilized to the limit, was applied
extensively to the public service, and was developed so as to
facilitate it. Likewise in the domain of building Stephan brought
about a decided improvement, which received my approval and
support.
All great state building projects depended on the vote of the
investigating "Academy of Building," which, at that time, was a slow-
moving, cumbrous, and backward body. I had already had
experiences of my own with it. The "White Drawing Room," originally
merely provisional, had been put up without much attention to style
—it had been intended at first for an Indian masquerade, a "Lalla
Rookh" festival, in honor of the Grand Duchess Charlotte, daughter
of Frederick William III, and her husband, later Tsar Nicholas I. An
investigation instituted at my order showed the material to be
spurious and inferior; the structure was in the worst possible state of
decay and in danger of collapse; a new one was needed.
With the co-operation and collaboration of the Empress Frederick,
projects and plans were made, and, finally, a big model was
provided by Building Councilor Ihne—the "modern Schlüter," as the
Empress Frederick used to call him—which won unanimous approval.
Only the Building Academy opposed wearisome objections, stating
that the "White Drawing Room" ought to be preserved "in its old
historical beauty," and required no alterations. When the new
structure was completed, however, it also met with the approval of
the gentlemen who had been formerly so critical.
Herr von Stephan also was at loggerheads with the Academy of
Building. He wanted to alter many post offices, or build entirely new
ones, especially in the big cities, but, in view of the fearful slowness
and devotion to red tape of the aforesaid official body, he used to
receive no answers at all, or else refusals, when he brought these
matters to its attention. The rule of thumb was supreme there. Herr
von Stephan was of the opinion that, in its buildings as well as in
other directions, the youthful German Empire must give an
impression of power, and that the Imperial post offices must be built
accordingly; he believed that they should harmonize with the general
style of the towns where they were located, or, at least, conform to
the style of the oldest and most important buildings there. Nor could
I do otherwise than agree with such a view.
ACADEMY'S SHACKLES BROKEN
At last there came a rupture with the aforementioned Academy. His
Excellency von Stephan lost patience and informed me that he had
freed his office, and the buildings erected by it, from the supervision
of the Academy; that he had even formed a committee from among
his own architects and officials for supervising purposes; and that all
he asked of me was to subject the more important plans for
buildings to a final inspection. I did so willingly.
Stephan was an enthusiastic huntsman, so that I had additional
opportunities, while on the court hunts, to enjoy association with
this refreshing, unchanging, faithful official and counselor.
Among the Ministers whom I particularly esteemed His Excellency
Miquel took first place. He it was who, as my Finance Minister, put
through for Prussia the great reform which placed the land on a
sound basis and helped it toward prosperity. Intercourse with this
astute political expert gave me great pleasure, and a wealth of
teaching and stimulus.
The degree to which Miquel was versed in all possible matters was
astounding. In conversation he was brisk, humorous, and keen in
elucidating and arguing on a subject, in addition to which a strong
historical bent ran, like a red thread, through his quotations. In
history and ancient languages he was marvelously well equipped, so
that, in his reports, he was able often to hark back to the times of
the Romans and quote from his store of knowledge—not out of
Büchmann[7]—pieces of Latin in support of his arguments. Even
when he was instructing he was never tiresome on account of his
brilliant dialectics, but used to hold his hearers spellbound to the
very end.
It was His Excellency Miquel likewise who incited me to favor the
great canal projects and supported me when the Prussian
Conservatives opposed the Central [Rhine-Weser-Elbe] Canal, and
caused the failure of the plan to build it. He lent strength to the King
and made the latter decide not to let up in this fight until victory was
won. He knew, as I did, what blessings the canals in Holland and the
splendid canal network of France had brought to those lands and
what a relief they were to the ever more hard-pressed railways. In
the World War we might have had a splendid east-to-west artery of
transportation for ammunition, wounded, siege material, supplies,
and the like, which would have made it possible, by thus relieving
the railways, for the latter to transport troops on an even greater
scale—moreover, this would have lessened the shortage of coal. In
time of peace also, for which the canal was destined, it would have
been most beneficial.
Minister von Miquel was a most ardent enthusiast for the Imperial
German idea and the German Empire of the Hohenzollerns: I lent an
attentive ear to his spirited handling of this theme. He was a man
who, clinging to the old tradition, thought in a great German,
Imperial way; he was fully adequate to the requirements and
demands of the new era, rightly appreciating when these were of
value.
From the start I concerned myself with the completion of the railway
system. From the reports relating to national defense and the
complaints of the General Staff, as well as from personal
observation, I knew of the absolutely incredible neglect suffered by
East Prussia in the matter of railways. The state of affairs was
absolutely dangerous, in view of the steady, though gradual,
reinforcing of the Russian troops facing our frontier, and the
development of the Russian railway system.
During the last years of his reign Emperor William the Great had
commanded Field Marshal Moltke to report on the situation, since
the Russian armies, under the influence of France, were being
posted ever more conspicuously on the eastern frontier of Prussia,
arousing apprehension as to the possibility of irruptions of great
masses of Russian cavalry into Prussia, Posen, and Silesia.
Quartermaster-General Count Waldersee and I were present at the
reading of this report. From it came the resolve to shift Prussian
troops eastward and to push toward completion the neglected
railway system.
The measures ordained by Emperor William I and begun by him
required time, particularly as the new railway bridges over the
Vistula and Nogat had to be built by the military authorities in the
teeth of strong official opposition (Maybach). Since the railways were
Welcome to our website – the ideal destination for book lovers and
knowledge seekers. With a mission to inspire endlessly, we offer a
vast collection of books, ranging from classic literary works to
specialized publications, self-development books, and children's
literature. Each book is a new journey of discovery, expanding
knowledge and enriching the soul of the reade
Our website is not just a platform for buying books, but a bridge
connecting readers to the timeless values of culture and wisdom. With
an elegant, user-friendly interface and an intelligent search system,
we are committed to providing a quick and convenient shopping
experience. Additionally, our special promotions and home delivery
services ensure that you save time and fully enjoy the joy of reading.
Let us accompany you on the journey of exploring knowledge and
personal growth!
ebookname.com

More Related Content

PDF
Java Network Programming Fourth Edition Elliotte Rusty Harold
PDF
Java Network Programming Fourth Edition Elliotte Rusty Harold
PDF
Java Network Programming Fourth Edition Harold Elliotte
PDF
Download full ebook of Restfulnet 1st Edition Jon Flanders instant download pdf
PDF
Java Network Programming, 4th Edition.pdf
PDF
Java Network Programming Third Edition 3rd Edition Elliotte Rusty Harold
PDF
Tcpip Network Administration 3rd Edition 3rd Edition Craig Hunt
PDF
Web_Development_with_Node_Express.pdf
Java Network Programming Fourth Edition Elliotte Rusty Harold
Java Network Programming Fourth Edition Elliotte Rusty Harold
Java Network Programming Fourth Edition Harold Elliotte
Download full ebook of Restfulnet 1st Edition Jon Flanders instant download pdf
Java Network Programming, 4th Edition.pdf
Java Network Programming Third Edition 3rd Edition Elliotte Rusty Harold
Tcpip Network Administration 3rd Edition 3rd Edition Craig Hunt
Web_Development_with_Node_Express.pdf

Similar to HTTP The Definitive Guide 1st Edition David Gourley (20)

PDF
Node Up And Running Scalable Serverside Code With Javascript 1st Edition Tom ...
PDF
Download full ebook of Learning Node Shelley Powers instant download pdf
PDF
Flask Web Development 1st Edition Miguel Grinberg
PDF
Programming Coldfusion Mx 2nd Edition Rob Brooksbilson
PDF
Restful Web Services Cookbook 1st Edition Subbu Allamaraju
PDF
SDN Software Defined Networks 1st Edition Thomas Nadeau D.
PDF
Learning Web App Development 1st Edition Semmy Purewal
PDF
Istio Up Running Using a Service Mesh to Connect Secure Control and Observe 1...
PDF
Web Security Privacy And Commerce 2nd Edition Second Edition Simson Garfinkel
PDF
Building Hypermedia Apis With Html5 And Node Mike Amundsen
PDF
Production Kubernetes: Building Successful Application Platforms 1st Edition ...
PDF
Cloud Foundry the definitive guide develop deploy and scale First Edition Winn
PDF
Javascript Web Applications Otx Alex Maccaw
PDF
Learning Rails 3 Rails from the Outside In 1st Edition Simon St. Laurent
PDF
Programming Windows Azure Programming The Microsoft Cloud 1st Edition Sriram ...
PDF
C 40 In A Nutshell Fourth Edition Joseph Albahari Ben Albahari
PDF
Reliable Distributed Systems Technologies Web Services And Applications Kenne...
PDF
SDN Software Defined Networks 1st Edition Thomas Nadeau D.
PDF
Object Storage with Swift Cloud storage administration through OpenStack 1. A...
PDF
Designing Evolvable Web Apis With Aspnet 1st Edition Glenn Block
Node Up And Running Scalable Serverside Code With Javascript 1st Edition Tom ...
Download full ebook of Learning Node Shelley Powers instant download pdf
Flask Web Development 1st Edition Miguel Grinberg
Programming Coldfusion Mx 2nd Edition Rob Brooksbilson
Restful Web Services Cookbook 1st Edition Subbu Allamaraju
SDN Software Defined Networks 1st Edition Thomas Nadeau D.
Learning Web App Development 1st Edition Semmy Purewal
Istio Up Running Using a Service Mesh to Connect Secure Control and Observe 1...
Web Security Privacy And Commerce 2nd Edition Second Edition Simson Garfinkel
Building Hypermedia Apis With Html5 And Node Mike Amundsen
Production Kubernetes: Building Successful Application Platforms 1st Edition ...
Cloud Foundry the definitive guide develop deploy and scale First Edition Winn
Javascript Web Applications Otx Alex Maccaw
Learning Rails 3 Rails from the Outside In 1st Edition Simon St. Laurent
Programming Windows Azure Programming The Microsoft Cloud 1st Edition Sriram ...
C 40 In A Nutshell Fourth Edition Joseph Albahari Ben Albahari
Reliable Distributed Systems Technologies Web Services And Applications Kenne...
SDN Software Defined Networks 1st Edition Thomas Nadeau D.
Object Storage with Swift Cloud storage administration through OpenStack 1. A...
Designing Evolvable Web Apis With Aspnet 1st Edition Glenn Block
Ad

Recently uploaded (20)

PDF
Paper A Mock Exam 9_ Attempt review.pdf.
PDF
Trump Administration's workforce development strategy
PDF
احياء السادس العلمي - الفصل الثالث (التكاثر) منهج متميزين/كلية بغداد/موهوبين
PDF
A systematic review of self-coping strategies used by university students to ...
PPTX
Introduction-to-Literarature-and-Literary-Studies-week-Prelim-coverage.pptx
PDF
Computing-Curriculum for Schools in Ghana
PDF
advance database management system book.pdf
PPTX
Cell Types and Its function , kingdom of life
PPTX
Introduction to Building Materials
PDF
OBE - B.A.(HON'S) IN INTERIOR ARCHITECTURE -Ar.MOHIUDDIN.pdf
PPTX
Tissue processing ( HISTOPATHOLOGICAL TECHNIQUE
PPTX
Onco Emergencies - Spinal cord compression Superior vena cava syndrome Febr...
DOC
Soft-furnishing-By-Architect-A.F.M.Mohiuddin-Akhand.doc
PDF
Classroom Observation Tools for Teachers
PDF
Weekly quiz Compilation Jan -July 25.pdf
PDF
Hazard Identification & Risk Assessment .pdf
PDF
A GUIDE TO GENETICS FOR UNDERGRADUATE MEDICAL STUDENTS
PDF
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
PDF
Practical Manual AGRO-233 Principles and Practices of Natural Farming
PDF
ChatGPT for Dummies - Pam Baker Ccesa007.pdf
Paper A Mock Exam 9_ Attempt review.pdf.
Trump Administration's workforce development strategy
احياء السادس العلمي - الفصل الثالث (التكاثر) منهج متميزين/كلية بغداد/موهوبين
A systematic review of self-coping strategies used by university students to ...
Introduction-to-Literarature-and-Literary-Studies-week-Prelim-coverage.pptx
Computing-Curriculum for Schools in Ghana
advance database management system book.pdf
Cell Types and Its function , kingdom of life
Introduction to Building Materials
OBE - B.A.(HON'S) IN INTERIOR ARCHITECTURE -Ar.MOHIUDDIN.pdf
Tissue processing ( HISTOPATHOLOGICAL TECHNIQUE
Onco Emergencies - Spinal cord compression Superior vena cava syndrome Febr...
Soft-furnishing-By-Architect-A.F.M.Mohiuddin-Akhand.doc
Classroom Observation Tools for Teachers
Weekly quiz Compilation Jan -July 25.pdf
Hazard Identification & Risk Assessment .pdf
A GUIDE TO GENETICS FOR UNDERGRADUATE MEDICAL STUDENTS
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
Practical Manual AGRO-233 Principles and Practices of Natural Farming
ChatGPT for Dummies - Pam Baker Ccesa007.pdf
Ad

HTTP The Definitive Guide 1st Edition David Gourley

  • 1. HTTP The Definitive Guide 1st Edition David Gourley pdf download https://ebookname.com/product/http-the-definitive-guide-1st- edition-david-gourley/ Get Instant Ebook Downloads – Browse at https://ebookname.com
  • 2. Instant digital products (PDF, ePub, MOBI) available Download now and explore formats that suit you... The Definitive Guide to SQLite Definitive Guide 1st Edition Mike Owens https://ebookname.com/product/the-definitive-guide-to-sqlite- definitive-guide-1st-edition-mike-owens/ The Definitive Guide to SOA Oracle Service Bus Second Edition The Definitive Guide Jeff Davies https://ebookname.com/product/the-definitive-guide-to-soa-oracle- service-bus-second-edition-the-definitive-guide-jeff-davies/ HBase The Definitive Guide 1st Edition Lars George https://ebookname.com/product/hbase-the-definitive-guide-1st- edition-lars-george/ The Role of Evidence in Risk Characterization Making Sense of Conflicting Data 1st Edition Peter M. Wiedemann https://ebookname.com/product/the-role-of-evidence-in-risk- characterization-making-sense-of-conflicting-data-1st-edition- peter-m-wiedemann/
  • 3. Credit Risk Scorecards Naeem Siddiqi https://ebookname.com/product/credit-risk-scorecards-naeem- siddiqi/ Endocrinology for the Small Animal Practitioner Made Easy Series 1st Edition Panciera https://ebookname.com/product/endocrinology-for-the-small-animal- practitioner-made-easy-series-1st-edition-panciera/ L Anconitana The Woman from Ancona Ruzante https://ebookname.com/product/l-anconitana-the-woman-from-ancona- ruzante/ The Ancient Mediterranean World The Cambridge World History of Slavery 1 1st Edition Keith Bradley https://ebookname.com/product/the-ancient-mediterranean-world- the-cambridge-world-history-of-slavery-1-1st-edition-keith- bradley/ Wound Healing Biomaterials Volume 1 Therapies and Regeneration 1st Edition Magnus Ågren https://ebookname.com/product/wound-healing-biomaterials- volume-1-therapies-and-regeneration-1st-edition-magnus-agren/
  • 4. Handbook of minerals as nutritional supplements 1st Edition Robert A. Disilvestro https://ebookname.com/product/handbook-of-minerals-as- nutritional-supplements-1st-edition-robert-a-disilvestro/
  • 9. HTTP The Definitive Guide David Gourley and Brian Totty with Marjorie Sayer, Sailu Reddy, and Anshu Aggarwal Beijing • Cambridge • Farnham • Köln • Paris • Sebastopol • Taipei • Tokyo
  • 10. HTTP: The Definitive Guide by David Gourley and Brian Totty with Marjorie Sayer, Sailu Reddy, and Anshu Aggarwal Copyright © 2002 O’Reilly Media, Inc. All rights reserved. Printed in the United States of America. Published by O’Reilly Media, Inc., 1005 Gravenstein Highway North, Sebastopol, CA 95472. O’Reilly Media, Inc. books may be purchased for educational, business, or sales promotional use. On- line editions are also available for most titles (safari.oreilly.com). For more information, contact our cor- porate/institutional sales department: (800) 998-9938 or corporate@oreilly.com. Editor: Linda Mui Production Editor: Rachel Wheeler Cover Designer: Ellie Volckhausen Interior Designers: David Futato and Melanie Wang Printing History: September 2002: First Edition. Nutshell Handbook, the Nutshell Handbook logo, and the O’Reilly logo are registered trademarks of O’Reilly Media, Inc. HTTP: The Definitive Guide, the image of a thirteen-lined ground squirrel, and related trade dress are trademarks of O’Reilly Media, Inc. Many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks. Where those designations appear in this book, and O’Reilly Media, Inc. was aware of a trademark claim, the designations have been printed in caps or initial caps. While every precaution has been taken in the preparation of this book, the publisher and authors assume no responsibility for errors or omissions, or for damages resulting from the use of the information contained herein. This book uses RepKover™ , a durable and flexible lay-flat binding. ISBN-10: 1-56592-509-2 ISBN-13: 978-1-56592-509-0 [C] [01/08]
  • 11. v Table of Contents Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xiii Part I. HTTP: The Web’s Foundation 1. Overview of HTTP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 HTTP: The Internet’s Multimedia Courier 3 Web Clients and Servers 4 Resources 4 Transactions 8 Messages 10 Connections 11 Protocol Versions 16 Architectural Components of the Web 17 The End of the Beginning 21 For More Information 21 2. URLs and Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 Navigating the Internet’s Resources 24 URL Syntax 26 URL Shortcuts 30 Shady Characters 35 A Sea of Schemes 38 The Future 40 For More Information 41 3. HTTP Messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 The Flow of Messages 43 The Parts of a Message 44
  • 12. vi | Table of Contents Methods 53 Status Codes 59 Headers 67 For More Information 73 4. Connection Management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74 TCP Connections 74 TCP Performance Considerations 80 HTTP Connection Handling 86 Parallel Connections 88 Persistent Connections 90 Pipelined Connections 99 The Mysteries of Connection Close 101 For More Information 104 Part II. HTTP Architecture 5. Web Servers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109 Web Servers Come in All Shapes and Sizes 109 A Minimal Perl Web Server 111 What Real Web Servers Do 113 Step 1: Accepting Client Connections 115 Step 2: Receiving Request Messages 116 Step 3: Processing Requests 120 Step 4: Mapping and Accessing Resources 120 Step 5: Building Responses 125 Step 6: Sending Responses 127 Step 7: Logging 127 For More Information 127 6. Proxies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129 Web Intermediaries 129 Why Use Proxies? 131 Where Do Proxies Go? 137 Client Proxy Settings 141 Tricky Things About Proxy Requests 144 Tracing Messages 150 Proxy Authentication 156
  • 13. Table of Contents | vii Proxy Interoperation 157 For More Information 160 7. Caching . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161 Redundant Data Transfers 161 Bandwidth Bottlenecks 161 Flash Crowds 163 Distance Delays 163 Hits and Misses 164 Cache Topologies 168 Cache Processing Steps 171 Keeping Copies Fresh 175 Controlling Cachability 182 Setting Cache Controls 186 Detailed Algorithms 187 Caches and Advertising 194 For More Information 196 8. Integration Points: Gateways, Tunnels, and Relays . . . . . . . . . . . . . . . . . . . . 197 Gateways 197 Protocol Gateways 200 Resource Gateways 203 Application Interfaces and Web Services 205 Tunnels 206 Relays 212 For More Information 213 9. Web Robots . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215 Crawlers and Crawling 215 Robotic HTTP 225 Misbehaving Robots 228 Excluding Robots 229 Robot Etiquette 239 Search Engines 242 For More Information 246 10. HTTP-NG . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 247 HTTP’s Growing Pains 247 HTTP-NG Activity 248
  • 14. viii | Table of Contents Modularize and Enhance 248 Distributed Objects 249 Layer 1: Messaging 250 Layer 2: Remote Invocation 250 Layer 3: Web Application 251 WebMUX 251 Binary Wire Protocol 252 Current Status 252 For More Information 253 Part III. Identification, Authorization, and Security 11. Client Identification and Cookies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 257 The Personal Touch 257 HTTP Headers 258 Client IP Address 259 User Login 260 Fat URLs 262 Cookies 263 For More Information 276 12. Basic Authentication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 277 Authentication 277 Basic Authentication 281 The Security Flaws of Basic Authentication 283 For More Information 285 13. Digest Authentication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 286 The Improvements of Digest Authentication 286 Digest Calculations 291 Quality of Protection Enhancements 299 Practical Considerations 300 Security Considerations 303 For More Information 306 14. Secure HTTP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 307 Making HTTP Safe 307 Digital Cryptography 309
  • 15. Table of Contents | ix Symmetric-Key Cryptography 313 Public-Key Cryptography 315 Digital Signatures 317 Digital Certificates 319 HTTPS: The Details 322 A Real HTTPS Client 328 Tunneling Secure Traffic Through Proxies 335 For More Information 336 Part IV. Entities, Encodings, and Internationalization 15. Entities and Encodings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 341 Messages Are Crates, Entities Are Cargo 342 Content-Length: The Entity’s Size 344 Entity Digests 347 Media Type and Charset 348 Content Encoding 351 Transfer Encoding and Chunked Encoding 354 Time-Varying Instances 359 Validators and Freshness 360 Range Requests 363 Delta Encoding 365 For More Information 369 16. Internationalization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 370 HTTP Support for International Content 370 Character Sets and HTTP 371 Multilingual Character Encoding Primer 376 Language Tags and HTTP 384 Internationalized URIs 389 Other Considerations 392 For More Information 392 17. Content Negotiation and Transcoding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 395 Content-Negotiation Techniques 395 Client-Driven Negotiation 396 Server-Driven Negotiation 397 Transparent Negotiation 400
  • 16. x | Table of Contents Transcoding 403 Next Steps 405 For More Information 406 Part V. Content Publishing and Distribution 18. Web Hosting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 411 Hosting Services 411 Virtual Hosting 413 Making Web Sites Reliable 419 Making Web Sites Fast 422 For More Information 423 19. Publishing Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 424 FrontPage Server Extensions for Publishing Support 424 WebDAV and Collaborative Authoring 429 For More Information 446 20. Redirection and Load Balancing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 448 Why Redirect? 449 Where to Redirect 449 Overview of Redirection Protocols 450 General Redirection Methods 452 Proxy Redirection Methods 462 Cache Redirection Methods 469 Internet Cache Protocol 473 Cache Array Routing Protocol 475 Hyper Text Caching Protocol 478 For More Information 481 21. Logging and Usage Tracking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 483 What to Log? 483 Log Formats 484 Hit Metering 492 A Word on Privacy 495 For More Information 495
  • 17. Table of Contents | xi Part VI. Appendixes A. URI Schemes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 499 B. HTTP Status Codes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 505 C. HTTP Header Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 508 D. MIME Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 533 E. Base-64 Encoding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 570 F. Digest Authentication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 574 G. Language Tags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 581 H. MIME Charset Registry . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 602 Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 617
  • 19. xiii Preface The Hypertext Transfer Protocol (HTTP) is the protocol programs use to communi- cate over the World Wide Web. There are many applications of HTTP, but HTTP is most famous for two-way conversation between web browsers and web servers. HTTP began as a simple protocol, so you might think there really isn’t that much to say about it. And yet here you stand, with a two-pound book in your hands. If you’re wondering how we could have written 650 pages on HTTP, take a look at the Table of Contents. This book isn’t just an HTTP header reference manual; it’s a veritable bible of web architecture. In this book, we try to tease apart HTTP’s interrelated and often misunderstood rules, and we offer you a series of topic-based chapters that explain all the aspects of HTTP. Throughout the book, we are careful to explain the “why” of HTTP, not just the “how.” And to save you time chasing references, we explain many of the critical non-HTTP technologies that are required to make HTTP applications work. You can find the alphabetical header reference (which forms the basis of most conventional HTTP texts) in a conveniently organized appendix. We hope this conceptual design makes it easy for you to work with HTTP. This book is written for anyone who wants to understand HTTP and the underlying architecture of the Web. Software and hardware engineers can use this book as a coherent reference for HTTP and related web technologies. Systems architects and network administrators can use this book to better understand how to design, deploy, and manage complicated web architectures. Performance engineers and ana- lysts can benefit from the sections on caching and performance optimization. Mar- keting and consulting professionals will be able to use the conceptual orientation to better understand the landscape of web technologies. This book illustrates common misconceptions, advises on “tricks of the trade,” pro- vides convenient reference material, and serves as a readable introduction to dry and confusing standards specifications. In a single book, we detail the essential and inter- related technologies that make the Web work.
  • 20. xiv | Preface This book is the result of a tremendous amount of work by many people who share an enthusiasm for Internet technologies. We hope you find it useful. Running Example: Joe’s Hardware Store Many of our chapters include a running example of a hypothetical online hardware and home-improvement store called “Joe’s Hardware” to demonstrate technology concepts. We have set up a real web site for the store (http://www.joes-hardware. com) for you to test some of the examples in the book. We will maintain this web site while this book remains in print. Chapter-by-Chapter Guide This book contains 21 chapters, divided into 5 logical parts (each with a technology theme), and 8 useful appendixes containing reference data and surveys of related technologies: Part I, HTTP: The Web’s Foundation Part II, HTTP Architecture Part III, Identification, Authorization, and Security Part IV, Entities, Encodings, and Internationalization Part V, Content Publishing and Distribution Part VI, Appendixes Part I, HTTP: The Web’s Foundation, describes the core technology of HTTP, the foundation of the Web, in four chapters: • Chapter 1, Overview of HTTP, is a rapid-paced overview of HTTP. • Chapter 2, URLs and Resources, details the formats of uniform resource locators (URLs) and the various types of resources that URLs name across the Internet. It also outlines the evolution to uniform resource names (URNs). • Chapter 3, HTTP Messages, details how HTTP messages transport web content. • Chapter 4, Connection Management, explains the commonly misunderstood and poorly documented rules and behavior for managing HTTP connections. Part II, HTTP Architecture, highlights the HTTP server, proxy, cache, gateway, and robot applications that are the architectural building blocks of web systems. (Web browsers are another building block, of course, but browsers already were covered thoroughly in Part I of the book.) Part II contains the following six chapters: • Chapter 5, Web Servers, gives an overview of web server architectures. • Chapter 6, Proxies, explores HTTP proxy servers, which are intermediary serv- ers that act as platforms for HTTP services and controls. • Chapter 7, Caching, delves into the science of web caches—devices that improve performance and reduce traffic by making local copies of popular documents.
  • 21. Preface | xv • Chapter 8, Integration Points: Gateways, Tunnels, and Relays, explains gateways and application servers that allow HTTP to work with software that speaks dif- ferent protocols, including Secure Sockets Layer (SSL) encrypted protocols. • Chapter 9, Web Robots, describes the various types of clients that pervade the Web, including the ubiquitous browsers, robots and spiders, and search engines. • Chapter 10, HTTP-NG, talks about HTTP developments still in the works: the HTTP-NG protocol. Part III, Identification, Authorization, and Security, presents a suite of techniques and technologies to track identity, enforce security, and control access to content. It con- tains the following four chapters: • Chapter 11, Client Identification and Cookies, talks about techniques to identify users so that content can be personalized to the user audience. • Chapter 12, Basic Authentication, highlights the basic mechanisms to verify user identity. The chapter also examines how HTTP authentication interfaces with databases. • Chapter 13, Digest Authentication, explains digest authentication, a complex proposed enhancement to HTTP that provides significantly enhanced security. • Chapter 14, Secure HTTP, is a detailed overview of Internet cryptography, digi- tal certificates, and SSL. Part IV, Entities, Encodings, and Internationalization, focuses on the bodies of HTTP messages (which contain the actual web content) and on the web standards that describe and manipulate content stored in the message bodies. Part IV contains three chapters: • Chapter 15, Entities and Encodings, describes the structure of HTTP content. • Chapter 16, Internationalization, surveys the web standards that allow users around the globe to exchange content in different languages and character sets. • Chapter 17, Content Negotiation and Transcoding, explains mechanisms for negotiating acceptable content. Part V, Content Publishing and Distribution, discusses the technology for publishing and disseminating web content. It contains four chapters: • Chapter 18, Web Hosting, discusses the ways people deploy servers in modern web hosting environments and HTTP support for virtual web hosting. • Chapter 19, Publishing Systems, discusses the technologies for creating web con- tent and installing it onto web servers. • Chapter 20, Redirection and Load Balancing, surveys the tools and techniques for distributing incoming web traffic among a collection of servers. • Chapter 21, Logging and Usage Tracking, covers log formats and common questions.
  • 22. xvi | Preface Part VI, Appendixes, contains helpful reference appendixes and tutorials in related technologies: • Appendix A, URI Schemes, summarizes the protocols supported through uni- form resource identifier (URI) schemes. • Appendix B, HTTP Status Codes, conveniently lists the HTTP response codes. • Appendix C, HTTP Header Reference, provides a reference list of HTTP header fields. • Appendix D, MIME Types, provides an extensive list of MIME types and explains how MIME types are registered. • Appendix E, Base-64 Encoding, explains base-64 encoding, used by HTTP authentication. • Appendix F, Digest Authentication, gives details on how to implement various authentication schemes in HTTP. • Appendix G, Language Tags, defines language tag values for HTTP language headers. • Appendix H, MIME Charset Registry, provides a detailed list of character encod- ings, used for HTTP internationalization support. Each chapter contains many examples and pointers to additional reference material. Typographic Conventions In this book, we use the following typographic conventions: Italic Used for URLs, C functions, command names, MIME types, new terms where they are defined, and emphasis Constant width Used for computer output, code, and any literal text Constant width bold Used for user input Comments and Questions Please address comments and questions concerning this book to the publisher: O’Reilly & Associates, Inc. 1005 Gravenstein Highway North Sebastopol, CA 95472 (800) 998-9938 (in the United States or Canada) (707) 829-0515 (international/local) (707) 829-0104 (fax)
  • 23. Preface | xvii There is a web page for this book, which lists errata, examples, or any additional information. You can access this page at: http://www.oreilly.com/catalog/httptdg/ To comment or ask technical questions about this book, send email to: bookquestions@oreilly.com For more information about books, conferences, Resource Centers, and the O’Reilly Network, see the O’Reilly web site at: http://www.oreilly.com Acknowledgments This book is the labor of many. The five authors would like to hold up a few people in thanks for their significant contributions to this project. To start, we’d like to thank Linda Mui, our editor at O’Reilly. Linda first met with David and Brian way back in 1996, and she refined and steered several concepts into the book you hold today. Linda also helped keep our wandering gang of first-time book authors moving in a coherent direction and on a progressing (if not rapid) time- line. Most of all, Linda gave us the chance to create this book. We’re very grateful. We’d also like to thank several tremendously bright, knowledgeable, and kind souls who devoted noteworthy energy to reviewing, commenting on, and correcting drafts of this book. These include Tony Bourke, Sean Burke, Mike Chowla, Shernaz Daver, Fred Douglis, Paula Ferguson, Vikas Jha, Yves Lafon, Peter Mattis, Chuck Neer- daels, Luis Tavera, Duane Wessels, Dave Wu, and Marco Zagha. Their viewpoints and suggestions have improved the book tremendously. Rob Romano from O’Reilly created most of the amazing artwork you’ll find in this book. The book contains an unusually large number of detailed illustrations that make subtle concepts very clear. Many of these illustrations were painstakingly cre- ated and revised numerous times. If a picture is worth a thousand words, Rob added hundreds of pages of value to this book. Brian would like to personally thank all of the authors for their dedication to this project. A tremendous amount of time was invested by the authors in a challenge to make the first detailed but accessible treatment of HTTP. Weddings, childbirths, killer work projects, startup companies, and graduate schools intervened, but the authors held together to bring this project to a successful completion. We believe the result is worthy of everyone’s hard work and, most importantly, that it provides a valuable service. Brian also would like to thank the employees of Inktomi for their enthusiasm and support and for their deep insights about the use of HTTP in real- world applications. Also, thanks to the fine folks at Cajun-shop.com for allowing us to use their site for some of the examples in this book.
  • 24. xviii | Preface David would like to thank his family, particularly his mother and grandfather for their ongoing support. He’d like to thank those that have put up with his erratic schedule over the years writing the book. He’d also like to thank Slurp, Orctomi, and Norma for everything they’ve done, and his fellow authors for all their hard work. Finally, he would like to thank Brian for roping him into yet another adventure. Marjorie would like to thank her husband, Alan Liu, for technical insight, familial support and understanding. Marjorie thanks her fellow authors for many insights and inspirations. She is grateful for the experience of working together on this book. Sailu would like to thank David and Brian for the opportunity to work on this book, and Chuck Neerdaels for introducing him to HTTP. Anshu would like to thank his wife, Rashi, and his parents for their patience, sup- port, and encouragement during the long years spent writing this book. Finally, the authors collectively thank the famous and nameless Internet pioneers, whose research, development, and evangelism over the past four decades contrib- uted so much to our scientific, social, and economic community. Without these labors, there would be no subject for this book.
  • 25. PART I HTTP: The Web’s Foundation This section is an introduction to the HTTP protocol. The next four chapters describe the core technology of HTTP, the foundation of the Web: • Chapter 1, Overview of HTTP, is a rapid-paced overview of HTTP. • Chapter 2, URLs and Resources, details the formats of URLs and the various types of resources that URLs name across the Internet. We also outline the evo- lution to URNs. • Chapter 3, HTTP Messages, details the HTTP messages that transport web content. • Chapter 4, Connection Management, discusses the commonly misunderstood and poorly documented rules and behavior for managing TCP connections by HTTP.
  • 27. 3 CHAPTER 1 Overview of HTTP The world’s web browsers, servers, and related web applications all talk to each other through HTTP, the Hypertext Transfer Protocol. HTTP is the common lan- guage of the modern global Internet. This chapter is a concise overview of HTTP. You’ll see how web applications use HTTP to communicate, and you’ll get a rough idea of how HTTP does its job. In particular, we talk about: • How web clients and servers communicate • Where resources (web content) come from • How web transactions work • The format of the messages used for HTTP communication • The underlying TCP network transport • The different variations of the HTTP protocol • Some of the many HTTP architectural components installed around the Internet We’ve got a lot of ground to cover, so let’s get started on our tour of HTTP. HTTP: The Internet’s Multimedia Courier Billions of JPEG images, HTML pages, text files, MPEG movies, WAV audio files, Java applets, and more cruise through the Internet each and every day. HTTP moves the bulk of this information quickly, conveniently, and reliably from web servers all around the world to web browsers on people’s desktops. Because HTTP uses reliable data-transmission protocols, it guarantees that your data will not be damaged or scrambled in transit, even when it comes from the other side of the globe. This is good for you as a user, because you can access information without worrying about its integrity. Reliable transmission is also good for you as an Internet application developer, because you don’t have to worry about HTTP communications
  • 28. 4 | Chapter 1: Overview of HTTP being destroyed, duplicated, or distorted in transit. You can focus on programming the distinguishing details of your application, without worrying about the flaws and foibles of the Internet. Let’s look more closely at how HTTP transports the Web’s traffic. Web Clients and Servers Web content lives on web servers. Web servers speak the HTTP protocol, so they are often called HTTP servers. These HTTP servers store the Internet’s data and provide the data when it is requested by HTTP clients. The clients send HTTP requests to servers, and servers return the requested data in HTTP responses, as sketched in Figure 1-1. Together, HTTP clients and HTTP servers make up the basic compo- nents of the World Wide Web. You probably use HTTP clients every day. The most common client is a web browser, such as Microsoft Internet Explorer or Netscape Navigator. Web browsers request HTTP objects from servers and display the objects on your screen. When you browse to a page, such as “http://www.oreilly.com/index.html,” your browser sends an HTTP request to the server www.oreilly.com (see Figure 1-1). The server tries to find the desired object (in this case, “/index.html”) and, if successful, sends the object to the client in an HTTP response, along with the type of the object, the length of the object, and other information. Resources Web servers host web resources. A web resource is the source of web content. The simplest kind of web resource is a static file on the web server’s filesystem. These files can contain anything: they might be text files, HTML files, Microsoft Word files, Adobe Acrobat files, JPEG image files, AVI movie files, or any other format you can think of. However, resources don’t have to be static files. Resources can also be software pro- grams that generate content on demand. These dynamic content resources can gen- erate content based on your identity, on what information you’ve requested, or on Figure 1-1. Web clients and servers HTTP request “Get me the document called /index.html.” Client Server www.oreilly.com HTTP response “Okay,here it is,it’s in HTML format and is 3,150 characters long.”
  • 29. Resources | 5 the time of day. They can show you a live image from a camera, or let you trade stocks, search real estate databases, or buy gifts from online stores (see Figure 1-2). In summary, a resource is any kind of content source. A file containing your com- pany’s sales forecast spreadsheet is a resource. A web gateway to scan your local public library’s shelves is a resource. An Internet search engine is a resource. Media Types Because the Internet hosts many thousands of different data types, HTTP carefully tags each object being transported through the Web with a data format label called a MIME type. MIME (Multipurpose Internet Mail Extensions) was originally designed to solve problems encountered in moving messages between different electronic mail systems. MIME worked so well for email that HTTP adopted it to describe and label its own multimedia content. Web servers attach a MIME type to all HTTP object data (see Figure 1-3). When a web browser gets an object back from a server, it looks at the associated MIME type to see if it knows how to handle the object. Most browsers can handle hundreds of popular object types: displaying image files, parsing and formatting HTML files, playing audio files through the computer’s speakers, or launching external plug-in software to handle special formats. Figure 1-2. A web resource is anything that provides web content Client Server Internet E-commerce gateway Realestatesearch gateway Stocktrading gateway Webcam gateway 11000101101 Imagefile Textfile Filesystem Resources
  • 30. Exploring the Variety of Random Documents with Different Content
  • 31. foot and horseback, as well as evolutions by bodies of troops in close formation. In describing the unveiling of the statue, as well as the funeral of King Edward VII, I have concerned myself purposely with the externals and pomp that are characteristic of such occasions in England. They show that, in a land under parliamentary rule, a so- called democratic land, more importance is attached to well-nigh mediæval magnificence than in the young German Empire. The French actions in Morocco, which were no longer such as could be reconciled with the Algeciras Agreement, had once more engaged the attention of the diplomats. For this reason the Chancellor had requested me to find out, as soon as opportunity should arise, what King George thought about the situation. I asked him if he thought that the French methods were still in accordance with the Algeciras Agreement. The King remarked that the agreement, to tell the truth, no longer was in force, and that the best thing to do would be to forget it; that the French, fundamentally, were doing nothing different in Morocco from what the English had previously done in Egypt; that, therefore, England would place no obstacles in the path of the French, but would let them alone; that the thing to do was to recognize the "fait accompli" of the occupation of Morocco and make arrangements, for commercial protection, with France. To the very end the visit went off well, and the inhabitants of London, of all social strata, expressed their good will every time the guests of their King showed themselves. Thus the German Imperial couple was enabled to return home with the best of impressions. When I informed the Chancellor of these, he expressed great satisfaction. From the remarks of King George he drew the inference that England considered the Algeciras Agreement no longer valid and would not place any obstacles in the way of the French occupation of Morocco.
  • 32. From this the policy followed by him and the Foreign Office arose which led to the Agadir case, the last and equally unsuccessful attempt to maintain our influence in Morocco. The situation became more serious during the Kiel regatta week. The Foreign Office informed me of its intention to send the Panther to Agadir. I gave expression to strong misgivings as to this step, but had to drop them in view of the urgent representations of the Foreign Office. In the first half of 1912 came the sending of Sir Ernest Cassel with a verbal note in which England offered to remain neutral in case of an "unprovoked" attack upon Germany, provided Germany agreed to limit her naval construction program and to drop her new Naval bill, the latter being darkly hinted at. Owing to our favorable answer to this Lord Haldane was intrusted with the negotiations and sent to Berlin. The negotiations finally fell through, owing to the constantly more uncompromising attitude of England (Sir E. Grey), who finally disavowed Lord Haldane and withdrew his own verbal note, because Grey was afraid to offend the French by a German-English agreement and jeopardize the Anglo-French-Russian understanding. Here are the details of the case: On the morning of January 29, 1912, Herr Ballin had himself announced to me at the palace in Berlin and asked for an audience. I assumed that it was a case of a belated birthday greeting, therefore I was not a little astonished when Ballin, after a short speech of congratulation, said that he had come as an emissary of Sir Ernest Cassel, who had just arrived in Berlin on a special mission and wished to be received. I asked whether it was a political matter, and why, if so, the meeting had not been arranged through the English ambassador. Ballin's answer was to the effect that, from hints dropped by Cassel, he knew the matter to be of great importance, and the explanation for Cassel's acting without the intervention of the ambassador was because the earnest desire had been expressed in London that the official diplomatic representatives, both the English and the German, should not be apprised of the affair.
  • 33. I declared that I was ready to receive Cassel at once, but added that, should his mission have to do with political questions, I should immediately summon the Chancellor, since I was a constitutional monarch and not in a position to deal with the representative of a foreign power alone without the Chancellor. Ballin fetched Cassel, who handed me a document which, he stated, had been prepared with the "approval and knowledge of the English Government." I read the short note through and was not a little surprised to see that I was holding in my hand a formal offer of neutrality in case Germany became involved in future warlike complications, conditioned upon certain limitations in the carrying out of our program of naval construction, which were to be the subject of mutual conferences and agreements. Walking with Ballin into the next room, I handed over the document for him to read. After he had done so both of us exclaimed in the same breath: "A verbal note!" It was plainly apparent that this "verbal note" was aimed at the forthcoming addition to our Naval law and designed in some way to delay or frustrate it. No matter how the matter was interpreted, I found myself confronted with a peculiar situation, which also amazed Ballin. It reminded me of the situation at Cronberg-Friedrichshof in 1905, when I was obliged to decline the demand, made to me personally by the English Under Secretary, Hardinge, that we should forego our naval construction. SURPRISE AT BRITISH NOTE Now, an intimate business friend of Edward VII appears, without previous announcement through official diplomatic channels, before the German Emperor with a "verbal note" inspired by the English Government, with explicit instructions to evade all the diplomatic officials of both countries. He hands over an offer from the English Government to maintain neutrality in future warlike complications provided certain agreements regarding limitation of naval
  • 34. construction are made. And this is done by England, the mother of "Constitutionalism"! When I pointed this out to Ballin, he exclaimed: "Holy Constitutionalism! What has become of you? That is 'personal politics' with a vengeance!" I agreed with Ballin to send at once for Herr von Bethmann, in order that he might learn what was transpiring and decide what to do in this peculiar situation. Bethmann was called up on the telephone and soon appeared. At first the situation aroused in him likewise a certain degree of astonishment; it was interesting to watch the play of expression on his face as he was told about the matter. The Chancellor suggested that Grand Admiral von Tirpitz also be summoned, for the proper dispatching of the business, and recommended that an answer be drawn up in English, in the same manner and form as the note delivered by Cassel, and that it be handed to Sir Ernest, who wished to return home that night. (English was chosen because there was fear of obscurity and misunderstanding if the note were translated in London.) The Chancellor asked me to draw up the note, since I knew English best. After some objection I had to make up my mind to be myself the writer of the answer. And now the following scene took place: I sat at the writing table in the adjutant's room; the other gentlemen stood around me. I would read a sentence from the note aloud and sketch out an answer, which was, in turn, read aloud. Then criticisms were made from right and left: one thought the sentence too complaisant, another too abrupt; it was thereupon remodeled, recast, improved, and polished. The Chancellor particularly subjected my grammar and style to much torture, owing to his habit of probing things philosophically, to his methods of profound thoroughness, which caused him to be most particular with every word, in order that it, having been studied from every angle, should later on afford nobody cause for criticism.
  • 35. After hours of work the note was finally finished and, having been passed a couple of times from hand to hand and then read aloud by me half a dozen times more, it was signed. When our group broke up, the Chancellor asked Sir Ernest who was to be expected from England to conduct the negotiations. Cassel replied that it would certainly be a Minister, which one he did not know—perhaps Mr. Winston Churchill, Minister of the Navy, since the question was a naval one. Then the Chancellor arranged further with him that the unofficial method should be retained and that Ballin should undertake to transmit all the news regarding the matter which should emanate from England. Sir Ernest expressed his lively gratitude for his cordial reception and his satisfaction at the tenor of our reply. Later Ballin informed me from his hotel that Cassel had expressed himself as completely satisfied over the successful outcome of his mission, and that he would report to his Government the good impression made upon him. When I thereupon conferred on the matter with Admiral von Tirpitz we both agreed that the Naval bill was in danger and, therefore, that we must be very careful. DIPLOMATIC PREPAREDNESS In perfect secrecy the material was collected which Admiral von Tirpitz was to present at the negotiations; it consisted of a short historical sketch of the development of the fleet and of the increasingly difficult tasks devolving upon it; the Naval law and its aims, nature, enactment, and extension; finally, the contemplated Naval bill, its meaning and the method of putting it through. The Chancellor asked that the main negotiations should be conducted at the palace in my presence. In addition, I agreed with Admiral von Tirpitz that he should speak English, as far as possible, and that I, in case of difficult technical expressions, would interpret.
  • 36. Until England made known the name of the negotiator, our time was spent in suppositions, and Ballin informed us of combinations in connection with which a number of names, even that of Grey, came up. At last the news arrived, through Ballin, that Haldane—the Minister of War, previously a lawyer—had been intrusted with the conduct of the negotiations and would soon arrive. General amazement! Just imagine, "mutatis mutandis," that Germany had sent her Minister of War (at that time von Heeringen) to London, instead of Admiral von Tirpitz, for the discussion of a naval matter! When this point was discussed with Bethmann and Tirpitz a number of suppositions were advanced; the Chancellor said that Haldane was known in England as a student of Goethe and as a man versed in German philosophy and knowing the German language, so that his choice was a piece of politeness toward us. Tirpitz observed that Haldane had formerly spent some time in Berlin and worked with General von Einem at the War Ministry, and hence knew the state of affairs in Germany. I suggested that all that was very well, but that the choice of Haldane showed that England looked upon the question as purely political, since he knew only superficially about naval affairs; that the whole thing was probably directed against Germany's naval policy in general and the new Naval bill in particular; that it would be well, therefore, not to forget this, in order that the whole thing might not develop into a foreign assault upon our right of self-determination as to the strength of our defensive measures. Haldane arrived and was received as an Imperial guest. Ballin, who accompanied him, solved the riddle of Haldane's choice on the basis of information received by him from England. He said that when Cassel had got back to London, reported on his reception, and handed over the German reply, the impression made was so favorable that no further doubt was entertained there as to the satisfactory course of the negotiations and their conclusion in the form of an agreement; that, thereupon a keen dispute had
  • 37. arisen among the Ministers, especially between Churchill and Grey, as to who should go to Berlin and affix his name to this great historical document, in case the object should be achieved of making Germany completely give up the further development of her fleet; that Churchill thought himself the right man for the job, since he was at the head of the navy. But Grey and Asquith would not let their colleague reap the glory, and, for this reason, Grey stood for a while in the foreground—another proof that it was politics rather than the number of ships which was to play the leading rôle. SELECTION OF CHURCHILL After a while, however, it was decided that it was more fitting to Grey's personal and official importance to appear only at the termination of the negotiations, to affix his name to the agreement, and—as it was put in the information transmitted from England to Ballin—"to get his dinner from the Emperor and to come in for his part of the festivities and fireworks"—which, in good German, means to enjoy the "Bengal light illumination." As it had been decided that Churchill was not to get this in any event, it was necessary to choose somebody for the negotiations who was close to Asquith and Grey and who, possessing their complete confidence, was willing to conduct the negotiations as far as the beginning of the "fireworks"; one who, moreover, was already known at Berlin and not a stranger in Germany. Churchill, to be sure, qualified in this, for he had been present a few times at the Imperial maneuvers in Silesia and Württemberg as a guest of the Emperor. Ballin guaranteed the reliability of his London source of information. Before the negotiations began I once more pointed out to Secretary of State von Tirpitz that Haldane, in spite of being just then Minister of War, probably had prepared himself for his task, and had surely received careful instructions from the English Admiralty, in which the spirit of Fisher was paramount. In his Handbook for English Naval Officers, Fisher had stated, among other precepts well worthy of
  • 38. being remembered, one which is characteristic of the Admiral, his department and its spirit, which runs, word for word, as follows: "If you tell a lie, stick to it." Moreover, I said to Tirpitz, we must not forget what an amazing adaptability the Anglo-Saxons had, which fitted them for occupying positions which had no relation to their previous life and training. Furthermore, the interest in England in the navy was generally so intense that almost every educated man was an expert up to a certain point on naval questions. In the course of the negotiations Haldane proved himself admirably well informed and a skillful, tenacious debater, and his brilliant qualities as a lawyer came to the fore. The conversation lasted several hours, and brought about a general clarifying, as well as a preliminary agreement as to postponement of time limits of ship construction, etc. The details concerning it are deposited in documents at the Imperial Naval Office. Tirpitz was splendid. After some more conferences—at which, likewise, Ballin was present —Haldane returned to England. Ballin informed me that Haldane had expressed himself to him as entirely satisfied with the outcome of his mission, and had stated that in about a week or two the first draft of the agreement could be sent to us. Time passed—the date set for the introduction of the Naval bill approached. Tirpitz suggested, in case the agreement were concluded previously, that the Naval bill be altered accordingly; otherwise, that it be introduced without alteration. SUSPECTS ENGLISH PURPOSES At last we received, not the draft of the agreement, but a document asking all sorts of questions and expressing a desire for all sorts of data, a reply to which required many consultations and much reflection. Little by little the suspicion grew in me that the English were not in earnest with regard to the agreement, since question
  • 39. followed question and details were sought which had nothing directly to do with the agreement. England withdrew more and more from her promises, and no draft of the agreement came to hand. In Berlin a big agitation set in against the Naval bill, Tirpitz and myself on the part of the Foreign Office, and from other quarters, both qualified and unqualified. The Chancellor also, who hoped to achieve the agreement and affix his name to a document which would free Germany from "encirclement" and bring her into a regular and better relationship with England, came out in favor of dropping the Naval bill. But that would simply have meant allowing a foreign power enormous influence in matters of German national defense and jeopardizing thereby the national right of self-determination and our readiness for battle in case of a war being forced upon us. Had we allowed this it would have amounted to our consenting to permit England, Germany's principal foe, to grant us whatever she wished, after consulting her own interests, without receiving ourselves the guaranty of any equivalent concession. In this confused state of affairs differences of opinion and violent disputes arose, which, especially in those circles which really knew little about the navy, were conducted with much violence and not always in a practical manner. Admiral von Tirpitz, all through that winter, which was so hard a one for him and me, fought his fight like a genuine, patriotic officer, realizing the situation and seeing through his opponents with clear vision and supporting me with complete conviction to the limit of his ability. All the Government officials agreed that no foreign country could be allowed any voice in helping decide what we had or had not to do toward insuring our protection. The hope of bringing about the agreement grew ever fainter; England continually showed lessening interest and kept eliminating important parts of her original verbal note. And so it came about that Admiral von Tirpitz and I realized that the whole proposal was merely a "maneuver." The fight over the German Naval bill grew steadily hotter. I happened at this time to meet at Cuxhaven Doctor von Burchard,
  • 40. President of the Hamburg Senate, whom I respected greatly, as he was the very model of an aristocratic citizen of a Hanseatic city, and who had often been consulted by me in political matters. I described to him the entire course of the affair and the disputes in Berlin as to the introduction or nonintroduction of the bill, and asked him then to tell me, with his usual complete frankness, what he thought the right thing to do in the interest of the national welfare, since I greatly desired to hear an objective opinion, uninfluenced by the rival camps of Berlin. Doctor Burchard replied in his clear, keen, pointed, convincing manner that it was my duty toward the people and the fatherland to stick to the bill; that whosoever spoke against its introduction was committing a sin against them; that whatever we thought necessary to our defense must be unconditionally brought into being; that, above all else, we must never permit a foreign country to have the presumption to interfere with us; that the English offer was a feint to make us drop the Naval bill; that this must, in no circumstances, be allowed; that the German nation would not understand why its right of self-determination had been sacrificed; that the bill must unquestionably be introduced; that he would work in its favor in the Federal Council (as indeed he did in a brilliant, compelling speech) and also otherwise press its acceptance in Berlin; that the English would naturally resort to abuse, but that this made no difference, since they had been doing so for a long time; that they certainly would not get into a war for such a cause; that Admiral von Tirpitz was merely doing his duty and fulfilling his obligations, and that I should support him in every way; that the Chancellor must give up opposing the measure, otherwise he would run the risk of finally forfeiting public esteem on account of being "pro-English." Thus spoke the representative of the great commercial city, which was threatened before all others in case of war with England. The genuine Hanseatic spirit inspired his words. Strangely enough, this opinion of Doctor Burchard concerning the English offer has recently been corroborated to me in Holland by a
  • 41. Dutchman who heard from Englishmen at that time the English point of view. I and Tirpitz guessed right—the offer of neutrality, in case naval expansion was curbed, was a political maneuver. COUNTERCHARGES OF CHEATING Soon news also came from Ballin that the matter was not going well in England: that, according to information received, a dispute had arisen about the agreement; that there was dissatisfaction with Haldane, who, it was said, had let himself be cheated by Tirpitz! This was plain evidence of the indignation felt because Tirpitz had not walked into the trap and simply let the bill drop, and that Haldane had been unable to serve up the bill to the English Cabinet on a platter at tea time. It is useless to say that there was any "cheating" on Germany's part, but the reproach leveled at Haldane justifies the suspicion that his instructions were that he should seek to "cheat" the Germans. Since his fellow countrymen thought that the reverse was true, one can but thank Admiral von Tirpitz most sincerely for having correctly asserted the German standpoint to the benefit of our fatherland. Toward the end of March the fight about the bill took on such violence that finally the Chancellor, on the 22d, asked me for his dismissal as I stepped out of the vault in the Charlottenburg Park. After long consultation and after I had told him Doctor Burchard's view, the Chancellor withdrew his request. When, some time afterward, I paid a visit to Herr von Bethmann in his garden, I found him quite overcome and holding in his hand a message from London. It contained the entire disavowal of the verbal note delivered by Cassel, the withdrawal of the offer of neutrality, as well as of every other offer, and at the end the advice that I dismiss Herr von Bethmann from the Imperial Chancellorship, since he enjoyed to a marked degree the confidence of the British Government! Tears of anger shone in the eyes of the Chancellor, thus badly deceived in his hopes; the praise accorded to him by a
  • 42. foreign government with which Germany and he had just had such painful experiences hurt him deeply. For the second time he offered me his resignation; I did not accept it, but sought to console him. I then ordered that the ambassador in London be asked how he could have accepted and forwarded such a message under any conditions. Now the Chancellor was in favor of the bill, but it was honorably proposed with the limitation which it had been decided to impose upon it in case of the conclusion of the agreement. In England, on the other hand, the full naval construction program was carried out. This "Haldane episode" is characteristic of England's policy. This whole maneuver, conceived on a large scale, was engineered for the sole purpose of hampering the development of the German fleet, while, simultaneously, in America, which had an almost negligible merchant fleet; in France, whose navy was superior in numbers to the German; in Italy, in Russia, which also had ships built abroad— vast construction programs were carried out without eliciting one word of protest from England. And Germany, wedged in between France and Russia, certainly had to be at least prepared to defend herself on the water against those nations. DEFENDS NAVAL PROGRAM For this our naval construction program was absolutely necessary; it was never aimed against the English fleet, four or five times as strong as ours, and assuring England's superiority and security, to equal the strength of which no sensible man in Germany ever dreamed. We needed our fleet for coast defense and the protection of our commerce; for this purpose the lesser means of defense, like U-boats, torpedo boats, and mines, were not sufficient. In addition the coast batteries on the Baltic were so antiquated and miserably equipped that they would have been razed within forty-eight hours by the massed fire of the heavy guns of modern battleships. Thus, our Baltic coast was practically defenseless. To protect it the fleet was necessary.
  • 43. The Skagerrak (Jutland) battle has proved what the fleet meant and what it was worth. That battle would have meant annihilation for England if the Reichstag had not refused up to 1900 all proposals for strengthening the navy. Those twelve lost years were destined never to be retrieved. Before we take our leave of Haldane I wish to touch upon another episode in his activities. In 1906 he came, with the permission of the German Government, to Berlin, to inform himself concerning the Prussian defense conditions, recruiting, General Staff, etc. He busied himself at the Ministry of War, where the Minister, General von Einem, personally gave him information. After about two or three weeks' work there he returned, well satisfied, to England. When, after the outbreak of the World War, the "pro-German" Haldane, the friend of Goethe, was boycotted and treated with such hostility that he could no longer show himself in public, he had a defense written of his term of office as Minister of War by the well- known littérateur and journalist, Mr. Begbie, entitled Vindication of Great Britain. Therein his services toward forming a regular General Staff and preparing the British army for the World War are placed in a bright light and emphasis is laid on the skill with which he utilized the permission obtained from the Prussian War Ministry in order to learn in Germany about military matters and to reorganize the British army and General Staff, to the minutest detail and on the German model, for the coming war against the erstwhile German hosts. Here we see the sly, adroit lawyer, who, sheltered under the hospitality of a foreign country, studies its military arrangements in order to forge weapons against it out of the material and knowledge thus acquired. Quite characteristically the book is dedicated to King Edward VII, whose intimate, emissary, and tool Haldane was. In those days Berlin saw in Haldane's mission a "rapprochement" with England, toward which Germans were always bending their efforts; in reality, however, it was a "reconnoitering expedition" under the very roof of the German cousin. England showed her gratitude by
  • 44. the World War, which Haldane helped to prepare; in this case Haldane "cheated" the Germans! That is the history of the Haldane mission. Later it was summarily maintained by all sorts of ignorant dabblers in politics, belonging to the press and the general public, that the promising "rapprochement" with England through Haldane had been wrecked by the obstinacy of the Emperor and Admiral von Tirpitz and by their clinging to the Naval bill against the wishes of all "sensible counselors!" KINGSHIP OF ALBANIA At that time [in 1912] the question of the establishment of an independent Albanian state and the choice by the Powers of a head for it, was brought to my attention also. A number of candidates lusting for a crown had already presented themselves before the tribunal of the Powers, without getting themselves accepted; a number of candidates, considered by the Powers, were declined by the Albanians. I looked upon the matter in itself with indifference, and was of the opinion that—as in the case of every "creation of a nation"—the greatest possible attention should be paid to historical development, also to geographical peculiarities and the customs of the inhabitants. In this peculiar land there has never been any united nation under one ruler and one dynasty. In valleys, encircled and cut off by high mountain ranges, the Albanian tribes live separated to a considerable degree from one another. Their political system is not unlike the clan system of the Scotch. Christians and Mohammedans are represented in equal numbers. The custom of "vendetta" is an ancient one, sanctified by tradition, which is no less true of robbery and cattle stealing. Agriculture is still in a backward stage of development, farming is in its infancy, the implements used therein date from before the flood.
  • 45. The head man of the clan dispenses justice in the open, under the village tree, as it used to be done once upon a time among the ancient Germans. Every man is armed and most are excellent shots. Whenever the head man of the clan turns up while on a horseback tour through his territory in some hamlet, the inhabitants expect a blessing from him in the form of jingling coins, which sometimes are scattered about by him from the saddle. This, of course, is particularly customary at the outset of a new Government's term, and great is the dissatisfaction when it does not happen. Up to the time of the Balkan War many Albanians entered the Turkish service, where they rose to high importance, being greatly prized on account of their diligence and keen intelligence, as well as their tenacious energy. They supplied the Turkish administration with a large number of officials, also with a certain percentage in the diplomatic corps and the army. The young Albanian nobles were proud to serve in a splendid company of palace guards of the Sultan, which scarcely had an equal for size, martial appearance, and manly beauty. These were partly relatives of the Sultan, since the latter used to have noble Albanian women of the principal clans in his harem in order that he—protected by blood brotherhood—might be safe from the "vendettas" of the clans, and, also, that he might find out everything that might serve to influence the feelings of the Albanian chieftains. The desires of the Albanians which reached him by this road—for instance, as to supplies of arms and ammunition, school houses, building of highways, etc.—were thereupon granted in an inconspicuous manner. Thus the Sultan was enabled to keep the usually turbulent Albanians quiet and loyal by means of "family ties." With this knowledge of the state of affairs as a foundation, I sought to bring my influence to bear toward having a Mohammedan Prince chosen, if possible—perhaps an Egyptian Prince—not forgetting that he should have a well-lined purse, which is an absolute necessity in Albania. My advice was not heeded by the "Areopagus of the Powers," whose members were not bothering themselves with the interests of the Albanians, but seeking, first of all, for pretexts and
  • 46. opportunities for fishing in the troubled Albanian waters in such a way as to benefit their own countries. OPPOSED CHOICE OF GERMAN Therefore, I was not at all pleased when the choice fell upon Prince William of Wied. I esteemed him as a distinguished, knightly man of lofty sentiments, but considered him unfitted for the post. The Prince knew altogether too little about Balkan affairs to be able to undertake this thorny task with hope of success. It was particularly unpleasant to me that a German Prince should make a fool of himself there, since it was apparent from the start that the Entente would place all sorts of obstacles in his path. Upon being questioned by the Prince, I told my cousin all my doubts, laying stress upon the difficulties awaiting him, and advised him urgently to decline. I could not command him, since the Prince of Wied, as head of the family, had the final word in the matter. After the Prince's acceptance of the candidacy offered him by the Powers, I received him in the presence of the Chancellor. A certain irresolution in the bearing of the Prince, who contemplated his new task with anything but enthusiasm, strengthened the resolve in me and the Chancellor to try hard once more to dissuade the young candidate from ascending the recently invented Albanian "throne." But in vain. The ambitious, mystically excited wife of the Prince saw in Albania the fulfillment of her wishes. And "ce que femme veut, Dieu le veut" ("what woman wishes, God wishes"). Carmen Sylva [the Queen of Rumania] also worked toward having him accept; she went so far, in fact, as to publish an article in the newspapers beginning "Fairyland Wants Its Prince." So even the best meant warnings were useless. I had also strongly advised the Prince not to go to Albania before the settlement of the financial question, since the reasons which had led me to suggest the selection of a rich ruler now came to the fore. The Prince was not very wealthy and the Powers had to supply him with a
  • 47. "donation," concerning the amount of which, and the method of paying it by installments, an unpleasant quarrel arose. At last a part payment was made. Danger lurked for the Prince and his eventual Government in the person of Essad Pasha, an unreliable, intriguing, greedy soldier of fortune, who himself had designs on the Albanian throne and held sway over a certain number of armed adherents. From the start he was an opponent of the new Prince and he plotted secretly with Italy, which was not favorably inclined toward the Prince of Wied. Now, it would have been quite natural and a matter of course if the new ruler had taken with him in his suite men from Germany whom he knew and who were faithful to him. But he did not. An Englishman and an Italian were attached to his person as "secretaries" and they had nothing better to do than to work against his interests, to give him bad advice and to intrigue against him. REQUIREMENTS OF A RULER During the time that the Prince of Wied was making his preparations the excellently written pamphlet of an Austrian General Staff officer, dealing with his travels in Albania, appeared. The officer described, in a lively and clear style, the geographical and climatic drawbacks, the population and customs, the general poverty and backwardness of the land. He pointed out that a future ruler of the land must in no circumstances reside on the coast, but must show himself to the inhabitants and travel about in the country. Owing to the primitive means of transportation, he went on, the lord of the land must sit all day on horseback and ride through his domain, having at his saddle bow the famous "bag of sequins" mentioned in all Oriental tales and legends, in order to sway public opinion in his favor in the places visited by the expected shower of gold. The ruler must be sure, the author continued, to bind some of the clans of the region closely to himself, so as to have at his beck and call an armed force for
  • 48. asserting his will and overcoming any opponents wishing to rebel, since this was the only way to maintain his power, in view of the utter lack of "troops" or an "army" in the European sense of the word. This meant that the ruler of Albania must lead at first a nomadic, horseback life, and, in addition, provide himself with a wandering camp, with tents and other accessories and the necessary horses. Plenty of men adapted to this sort of life might have been found in his squadron of the Third Guard Uhlan Regiment, since many of his Uhlans, who were very fond of the Prince, had declared that they were ready to accompany him as volunteers. Surely, they would have served him better and been more useful to him than what he did in preparing to take over the overlordship of Albania, without knowledge of the country. I advised my cousin urgently to study this pamphlet and to follow its recommendations, especially with regard to his residence, which should be fixed at some point as far as possible from the warships of the Powers, in order that he might not be forced to act under their pressure and arouse suspicion among the Albanians that their ruler needed these ships for protection against his subjects. Did the Prince ever read the pamphlet? In any event, the course adopted by him subsequently was contrary to its advice and the advice given him by me. The Prince and his wife journeyed to Albania, and things turned out as I had foreseen. According to reports describing the arrival of the sovereign couple, the Princess, although she was a German, addressed the assembled Albanians from her balcony in French, since they understood no German! The "court" remained at Durazzo under the guns of the foreign ships. The Prince did not travel on horseback through the land, nor did he scatter gold sequins about— not even from his balcony on the day of his arrival—nor did he push Essad out of the way. So the adventure ended as one might imagine. I have gone into some detail in describing my opinion and attitude toward the question of the choice of the ruler of Albania because,
  • 49. from every possible quarter, false rumors have been circulated for the purpose of imputing to me motives which were utterly foreign to me. In this matter, also, I gave honest advice when questioned, based on sound knowledge of mankind. The year 1912 also witnessed the meeting with the Tsar at Baltisch- Port, whither I repaired on board my yacht at the invitation of Nicholas II. Our two yachts anchored side by side, so that visiting from ship to ship was easy. The Tsar, his children, and his entire entourage vied with one another in evidences of good will and hospitality. The Russian and German escorting squadrons were inspected, turn and turn about, by the Tsar and myself together, and we took our meals either at the Tsar's table or mine. We spent one morning on land near Baltisch-Port. The Eighty-fifth "Viborg" Infantry Regiment, whose commander I was, had been drawn up in a field and was inspected first in parade formation, then in company and battalion exercises, which were carried out in as satisfactory a manner as was the parade with which the evolutions were brought to a close. The regiment, composed of four battalions, made an excellent impression. It was in field equipment—brown-gray blouses and caps —and the latter, worn jauntily cocked over one ear by all, gave to the sun-browned, martial faces of the strong young soldiers a bold air which brought joy to the heart of every soldier who gazed upon them. In the course of the brilliant and uncommonly amiable reception which I met with on this occasion I received no hint of the Balkan alliance, concluded a short time before. It was my last visit in Russia before the outbreak of the war.
  • 50. CHAPTER VI My Co-workers in the Administration It behooves me to remark that I found particular pleasure in working with His Excellency von Stephan and in dealing with him. He was a man of the old school, who fitted in so well with me that he always grasped my ideas and suggestions and afterward carried them out with energy and power, owing to his firm belief in them. A man of iron energy and unflagging capacity for work and joyousness; endowed, moreover, with refreshing humor, quick to perceive new possibilities, never at a loss for expedients, well versed in political and technical matters, he seemed to have been born especially for creative co-operation. I trusted him implicitly, and my trust in him was never betrayed. I learned much from my association with this stimulating, shrewd counselor. The Post-Office Department reached an unimagined degree of excellence and aroused the admiration of the whole world. The great invention of the telephone was utilized to the limit, was applied extensively to the public service, and was developed so as to facilitate it. Likewise in the domain of building Stephan brought about a decided improvement, which received my approval and support. All great state building projects depended on the vote of the investigating "Academy of Building," which, at that time, was a slow- moving, cumbrous, and backward body. I had already had experiences of my own with it. The "White Drawing Room," originally merely provisional, had been put up without much attention to style
  • 51. —it had been intended at first for an Indian masquerade, a "Lalla Rookh" festival, in honor of the Grand Duchess Charlotte, daughter of Frederick William III, and her husband, later Tsar Nicholas I. An investigation instituted at my order showed the material to be spurious and inferior; the structure was in the worst possible state of decay and in danger of collapse; a new one was needed. With the co-operation and collaboration of the Empress Frederick, projects and plans were made, and, finally, a big model was provided by Building Councilor Ihne—the "modern Schlüter," as the Empress Frederick used to call him—which won unanimous approval. Only the Building Academy opposed wearisome objections, stating that the "White Drawing Room" ought to be preserved "in its old historical beauty," and required no alterations. When the new structure was completed, however, it also met with the approval of the gentlemen who had been formerly so critical. Herr von Stephan also was at loggerheads with the Academy of Building. He wanted to alter many post offices, or build entirely new ones, especially in the big cities, but, in view of the fearful slowness and devotion to red tape of the aforesaid official body, he used to receive no answers at all, or else refusals, when he brought these matters to its attention. The rule of thumb was supreme there. Herr von Stephan was of the opinion that, in its buildings as well as in other directions, the youthful German Empire must give an impression of power, and that the Imperial post offices must be built accordingly; he believed that they should harmonize with the general style of the towns where they were located, or, at least, conform to the style of the oldest and most important buildings there. Nor could I do otherwise than agree with such a view. ACADEMY'S SHACKLES BROKEN At last there came a rupture with the aforementioned Academy. His Excellency von Stephan lost patience and informed me that he had freed his office, and the buildings erected by it, from the supervision
  • 52. of the Academy; that he had even formed a committee from among his own architects and officials for supervising purposes; and that all he asked of me was to subject the more important plans for buildings to a final inspection. I did so willingly. Stephan was an enthusiastic huntsman, so that I had additional opportunities, while on the court hunts, to enjoy association with this refreshing, unchanging, faithful official and counselor. Among the Ministers whom I particularly esteemed His Excellency Miquel took first place. He it was who, as my Finance Minister, put through for Prussia the great reform which placed the land on a sound basis and helped it toward prosperity. Intercourse with this astute political expert gave me great pleasure, and a wealth of teaching and stimulus. The degree to which Miquel was versed in all possible matters was astounding. In conversation he was brisk, humorous, and keen in elucidating and arguing on a subject, in addition to which a strong historical bent ran, like a red thread, through his quotations. In history and ancient languages he was marvelously well equipped, so that, in his reports, he was able often to hark back to the times of the Romans and quote from his store of knowledge—not out of Büchmann[7]—pieces of Latin in support of his arguments. Even when he was instructing he was never tiresome on account of his brilliant dialectics, but used to hold his hearers spellbound to the very end. It was His Excellency Miquel likewise who incited me to favor the great canal projects and supported me when the Prussian Conservatives opposed the Central [Rhine-Weser-Elbe] Canal, and caused the failure of the plan to build it. He lent strength to the King and made the latter decide not to let up in this fight until victory was won. He knew, as I did, what blessings the canals in Holland and the splendid canal network of France had brought to those lands and what a relief they were to the ever more hard-pressed railways. In the World War we might have had a splendid east-to-west artery of transportation for ammunition, wounded, siege material, supplies,
  • 53. and the like, which would have made it possible, by thus relieving the railways, for the latter to transport troops on an even greater scale—moreover, this would have lessened the shortage of coal. In time of peace also, for which the canal was destined, it would have been most beneficial. Minister von Miquel was a most ardent enthusiast for the Imperial German idea and the German Empire of the Hohenzollerns: I lent an attentive ear to his spirited handling of this theme. He was a man who, clinging to the old tradition, thought in a great German, Imperial way; he was fully adequate to the requirements and demands of the new era, rightly appreciating when these were of value. From the start I concerned myself with the completion of the railway system. From the reports relating to national defense and the complaints of the General Staff, as well as from personal observation, I knew of the absolutely incredible neglect suffered by East Prussia in the matter of railways. The state of affairs was absolutely dangerous, in view of the steady, though gradual, reinforcing of the Russian troops facing our frontier, and the development of the Russian railway system. During the last years of his reign Emperor William the Great had commanded Field Marshal Moltke to report on the situation, since the Russian armies, under the influence of France, were being posted ever more conspicuously on the eastern frontier of Prussia, arousing apprehension as to the possibility of irruptions of great masses of Russian cavalry into Prussia, Posen, and Silesia. Quartermaster-General Count Waldersee and I were present at the reading of this report. From it came the resolve to shift Prussian troops eastward and to push toward completion the neglected railway system. The measures ordained by Emperor William I and begun by him required time, particularly as the new railway bridges over the Vistula and Nogat had to be built by the military authorities in the teeth of strong official opposition (Maybach). Since the railways were
  • 54. Welcome to our website – the ideal destination for book lovers and knowledge seekers. With a mission to inspire endlessly, we offer a vast collection of books, ranging from classic literary works to specialized publications, self-development books, and children's literature. Each book is a new journey of discovery, expanding knowledge and enriching the soul of the reade Our website is not just a platform for buying books, but a bridge connecting readers to the timeless values of culture and wisdom. With an elegant, user-friendly interface and an intelligent search system, we are committed to providing a quick and convenient shopping experience. Additionally, our special promotions and home delivery services ensure that you save time and fully enjoy the joy of reading. Let us accompany you on the journey of exploring knowledge and personal growth! ebookname.com