From 95aca4b4d8fa62815d4bd412fff1a364f842814a Mon Sep 17 00:00:00 2001 From: Ryan Johnson Date: Thu, 29 Apr 2021 16:16:42 -0700 Subject: remove retired locales (#699) --- files/id/web/http/basics_of_http/index.html | 51 -- files/id/web/http/index.html | 81 --- files/id/web/http/methods/get/index.html | 73 --- files/id/web/http/methods/index.html | 76 --- files/id/web/http/overview/index.html | 174 ----- .../http/proxy_servers_and_tunneling/index.html | 100 --- .../proxy_auto-configuration_pac_file/index.html | 728 --------------------- files/id/web/http/status/100/index.html | 46 -- files/id/web/http/status/200/index.html | 50 -- files/id/web/http/status/400/index.html | 39 -- files/id/web/http/status/403/index.html | 56 -- files/id/web/http/status/404/index.html | 63 -- files/id/web/http/status/405/index.html | 44 -- files/id/web/http/status/410/index.html | 54 -- files/id/web/http/status/500/index.html | 38 -- files/id/web/http/status/index.html | 141 ---- 16 files changed, 1814 deletions(-) delete mode 100644 files/id/web/http/basics_of_http/index.html delete mode 100644 files/id/web/http/index.html delete mode 100644 files/id/web/http/methods/get/index.html delete mode 100644 files/id/web/http/methods/index.html delete mode 100644 files/id/web/http/overview/index.html delete mode 100644 files/id/web/http/proxy_servers_and_tunneling/index.html delete mode 100644 files/id/web/http/proxy_servers_and_tunneling/proxy_auto-configuration_pac_file/index.html delete mode 100644 files/id/web/http/status/100/index.html delete mode 100644 files/id/web/http/status/200/index.html delete mode 100644 files/id/web/http/status/400/index.html delete mode 100644 files/id/web/http/status/403/index.html delete mode 100644 files/id/web/http/status/404/index.html delete mode 100644 files/id/web/http/status/405/index.html delete mode 100644 files/id/web/http/status/410/index.html delete mode 100644 files/id/web/http/status/500/index.html delete mode 100644 files/id/web/http/status/index.html (limited to 'files/id/web/http') diff --git a/files/id/web/http/basics_of_http/index.html b/files/id/web/http/basics_of_http/index.html deleted file mode 100644 index a00d7fe410..0000000000 --- a/files/id/web/http/basics_of_http/index.html +++ /dev/null @@ -1,51 +0,0 @@ ---- -title: Basics of HTTP -slug: Web/HTTP/Basics_of_HTTP -tags: - - Guide - - HTTP - - NeedsTranslation - - Overview - - TopicStub -translation_of: Web/HTTP/Basics_of_HTTP ---- -
{{HTTPSidebar}}
- -

HTTP adalah sebuah protokol yang dapat diperluas. HTTP bergantung pada beberapa konsep dasar seperti the notion of resources and URIs, a simple structure of messages, and a client-server structure for the communication flow. On top of these basic concepts, numerous extensions have appeared over the years, adding new functionality and new semantics by creating new HTTP methods or headers.

- -

Articles

- -
-
Overview of HTTP
-
Describes what HTTP is and its role in the Web architecture, its position in the protocol stack.
-
Evolution of HTTP
-
HTTP was created in the early 1990s and has been extended several times. This article goes through its history and describes HTTP/0.9, HTTP/1.0, HTTP/1.1, and the modern HTTP/2 as well as minor novelties introduced over the years.
-
Negotiating an HTTP version
-
Explains how a client and a server can negotiate a specific HTTP version and eventually upgrade the protocol version used.
-
Resources and URIs
-
A brief introduction of the notion of resources, identifiers, and locations on the Web.
-
Identifying resources on the Web
-
Describes how Web resources are referenced and how to locate them.
-
Data URIs
-
A specific kind of URIs that directly embeds the resource it represents. Data URIs are very convenient, but have some caveats.
-
Resource URLs {{Non-standard_Inline}}
-
Resource URLs, URLs prefixed with the resource: scheme, are used by Firefox and Firefox browser extensions to load resources internally, but some of the information is available to sites the browser connects to as well.
-
Separating identity and location of a resource: the Alt-Svc HTTP header
-
Most of the time identity and location of a Web resource are shared, this can be changed with the {{HTTPHeader("Alt-Svc")}} header.
-
MIME types
-
Since HTTP/1.0, different types of content can be transmitted. This article explains how this is done using the {{HTTPHeader("Content-Type")}} header and the MIME standard.
-
Choosing between www and non-www URLs
-
Advice on using a www-prefixed domain or not, this article explains the consequences of the choice as well as how to make it.
-
Flow of an HTTP session
-
This fundamental article describes a typical HTTP session: what happens under the hood when you click on a link in your browser…
-
HTTP Messages
-
HTTP Messages transmitted during requests or responses have a very clear structure; this introductory article describes this structure, its purpose and its possibilities.
-
Frame and message structure in HTTP/2
-
HTTP/2 encapsulates and represents HTTP/1.x messages in a binary frame. This article explains the frame structure, its purpose and the way it is encoded.
-
Connection management in HTTP/1.x
-
HTTP/1.1 was the first version of HTTP to support persistent connection and pipelining. This article explains these two concepts.
-
Connection management in HTTP/2
-
HTTP/2 completely revisited how connections are created and maintained: this article explains how HTTP frames allow multiplexing and solve the 'head-of-line' blocking problem of former HTTP versions.
-
Content Negotiation
-
HTTP introduces a set of headers, starting with Accept- as a way for a browser to announce the format, language, or encoding it prefers. This article explains how this advertisement happens, how the server is expected to react and how it will choose the most adequate response.
-
diff --git a/files/id/web/http/index.html b/files/id/web/http/index.html deleted file mode 100644 index 3e2144fb57..0000000000 --- a/files/id/web/http/index.html +++ /dev/null @@ -1,81 +0,0 @@ ---- -title: HTTP -slug: Web/HTTP -tags: - - HTTP - - Referensi - - Web -translation_of: Web/HTTP ---- -
{{HTTPSidebar}}
- -

Hypertext Transfer Protocol (HTTP) adalah sebuah protokol lapisan-aplikasi untuk mentransmisi dokumen hypermedia, seperti HTML. Ini dirancang untuk komunikasi antara peramban web dan server web, meskipun bisa digunakan untuk keperluan lain juga. Ini mengikuti sebuah model klien-server klasik, dengan sebuah klien membuka sebuah koneksi, membuat sebuah permintaan (request), dan menunggu hingga mendapatkan sebuah respon. Ini juga sebuah protokol tanpa-keadaan, maksudnya server tidak menyimpan data (keadaan) antara kedua permintaan. Meskipun kadang berdasarkan pada sebuah lapisan TCP/IP, bisa digunakan pada lapisan transport andal apa saja;  berarti sebuah protokol tidak kehilangan pesan secara diam-diam, seperti UDP.

- -
-
-

Tutorial

- -

Belajar bagaimana untuk menggunakan HTTP dengan panduan dan tutorial.

- -
-
Ikhtisan dari HTTP
-
Fitur dasar dari protokol klien-server: apa yang bisa digunakan dan penggunaannya.
-
HTTP Cache
-
Caching sangat penting untuk mempercepat situs web. Artikel ini menjelaskan perbedaan metode dalam caching  dan bagaimana menggunakan HTTP Headers untuk mengendalikannya.
-
HTTP Kuki
-
Bagaimana kuki bekerja didefinisi oleh RFC 6265. Pada penerimaan sebuah permintaan HTTP, sebuah server bisa mengirim sebuah header Set-Cookie dengan responnya. Klien kemudian mengembalikan nilai kuki dengan setiap permintaan ke server yang sama dalam bentuk header permintaan Cookie. Kuki juga dapat ditetapkan untuk kadaluarsa pada tanggal tertentu, atau pembatasan pada domain dan jalur tertentu.
-
Cross-Origin Resource Sharing (CORS)
-
Permintaan Cross-site HTTP adalah permintaan HTTP untuk sumber daya dari domain lain kemduian domain dari sumberdaya membuat permintaan. Contohnya, sebuah laman HTML dari Domain A (http://domaina.example/), membuat sebuah permintaan untuk sebuah gambar pada Domain B (http://domainb.foo/image.jpg) malalui elemen img. Laman situs saat ini sangat biasa memuat sumber daya cross-site, termasuk CSS sytlesheets, gambar, skrip, dan sumber daya lainnya. CORS memungkinkan pengembang web untuk mengendaikan bagaimana situs mereka bereaksi kepada permintaan cross-site.
-
- -
-
Perkembangan dari HTTP
-
Sebuah deskripsi  dari perubahan antara HTTP veri awal, ke HTTP/2 moderen dan seterusnya.
-
Panduan keamanan situs Mozilla
-
Sebuah koleksi dari tip untuk membantu tim operasional dengan membuat aplikasi web yang aman.
-
Pesan HTTP (HTTP Messages)
-
Penjelasan tipe dan struktur dari berbagai jenis dan struktur dari HTTP/1.x dan HTTP/2.
-
Sebuah sesi HTTP yang khas
-
Menunjukan dan menjelaskan alur dari sebuah sesi HTTP biasa.
-
 
-
Manajemen koneksi pada HTTP/1.x
-
Menjelaskan tiga model manajemen koneksi yang tersedia pada HTTP/1.x, serta kelebihan dan kekurangan mereka.
-
-
- -
-

Referensi

- -

Jelajahi dokumentasi referensi HTTP yang terperinci.

- -
-
HTTP Headers
-
Pesan HTTP digunakan untuk menjelaskan secara tepat sumber daya atau perilaku dari server atau klien. header kepemilikan khusus bisa ditambahkan dengan menggunakan awalan X-; yang lain pada sebuah registri IANA, yang konten aslinya didefiniskan di RFC 4229. IANA juga mengelola registri dari usulan baru header pesan HTTP.
-
Metode Permintaan HTTP
-
Berbagai operasi yang bisa dilakukan dengan HTTP: {{HTTPMethod("GET")}}, {{HTTPMethod("POST")}}, tetapi juga permintaan yang kurang umum seperti {{HTTPMethod("OPTIONS")}}, {{HTTPMethod("DELETE")}} atau {{HTTPMethod("TRACE")}}.
-
Kode Status Respon HTTP
-
Kode respon HTTP menunjukan apakah permintaan HTTP tertentu berhasil diselesaikan. Respon dikelompokan dalam lima kelas: respon informasi, respon sukses, pengaihan, kesalahan klien, dan kealahan server.
-
Petunjuk CSP (CSP directives)
-
Bidang header respon {{HTTPHeader("Content-Security-Policy")}} memungkinkan administrator situs web untuk mengendalikan sumber daya user agent yang memungkinkan untuk dimuat pada halaman tertentu. Dengan beberapa pengecualian, sebagian besar kebijakan melibatkan penentuan asal server dan skrip titik-akhir (endpoints). 
-
- -

Alat & sumber daya

- -

Alat dan sumber daya yang berguna untuk memahami dan debugging HTTP.

- -
-
Firefox Developer Tools
-
Network monitor
-
Mozilla Observatory
-
-

Sebuah proyek yang dideain untuk membantu pengembang, administrator sistem, dan keamanan profesional mengkonfigurasi situs mereka secara aman.

-
-
RedBot
-
Alat untuk memeriksa header terkati-cache Anda.
-
Bagaimana Peramban Bekerja
-
Sebuah artikel yang sangat komprehensif tentang internal peramban dan alur permintaan melalui protokol HTTP. Sebuah artikel yang HARUS-DIBACA oleh tiap pengembang web.
-
- -

 

-
-
diff --git a/files/id/web/http/methods/get/index.html b/files/id/web/http/methods/get/index.html deleted file mode 100644 index ff8f8cdbab..0000000000 --- a/files/id/web/http/methods/get/index.html +++ /dev/null @@ -1,73 +0,0 @@ ---- -title: GET -slug: Web/HTTP/Methods/GET -tags: - - HTTP - - Referensi - - Request method -translation_of: Web/HTTP/Methods/GET ---- -
{{HTTPSidebar}}
- -

Request HTTP GET method merupakan representasi dari resource spesifik. Request menggunakan GET hanya menerima data.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Request has bodyNo
Successful response has bodyYes
{{Glossary("Safe")}}Yes
{{Glossary("Idempotent")}}Yes
{{Glossary("Cacheable")}}Yes
Allowed in HTML formsYes
- -

Sintaks

- -
GET /index.html
-
- -

Spesifikasi

- - - - - - - - - - - - -
SpesifikasiJudul
{{RFC("7231", "GET", "4.3.1")}}Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content
- -

Kompabilitas Browser

- - - -

{{Compat("http.methods.GET")}}

- -

Lihat Juga

- - diff --git a/files/id/web/http/methods/index.html b/files/id/web/http/methods/index.html deleted file mode 100644 index 1045732cc2..0000000000 --- a/files/id/web/http/methods/index.html +++ /dev/null @@ -1,76 +0,0 @@ ---- -title: HTTP request methods -slug: Web/HTTP/Methods -tags: - - HTTP - - Methods - - Reference - - TopicStub -translation_of: Web/HTTP/Methods ---- -
{{HTTPSidebar}}
- -
HTTP mendefinisikan seperangkat metode permintaan untuk menunjukkan tindakan yang diinginkan yang akan dilakukan untuk sumber daya tertentu. Meskipun mereka juga bisa menjadi kata benda, metode permintaan ini kadang-kadang disebut sebagai verba HTTP. Masing-masing menerapkan semantik yang berbeda, namun beberapa fitur umum digunakan bersama oleh mereka: mis. Metode permintaan dapat berupa {{glossary("safe")}}, {{glossary("idempotent")}}, atau {{glossary("cacheable")}}.
- -
 
- -
-
GET
-
Metode GET meminta representasi sumber daya yang ditentukan. Permintaan menggunakan GET seharusnya hanya mengambil data..
-
HEAD
-
Metode HEAD meminta tanggapan yang identik dengan permintaan GET, namun tanpa respon body.
-
POST
-
Metode POST digunakan untuk mengirimkan entitas ke sumber daya yang ditentukan, sering menyebabkan perubahan pada keadaan atau efek samping pada server.
-
PUT
-
-

Metode PUT menggantikan semua representasi terkini dari sumber target dengan muatan permintaan.

-
-
DELETE
-
Metode DELETE akan menghapus sumber daya yang ditentukan.
-
CONNECT
-
-

Metode CONNECT menetapkan terowongan ke server yang diidentifikasi oleh sumber target.

-
-
OPTIONS
-
Metode OPTIONS digunakan untuk menggambarkan opsi komunikasi untuk sumber target.
-
TRACE
-
-

Metode TRACE melakukan tes pesan loop-back di sepanjang jalan menuju sumber daya target.

-
-
PATCH
-
Metode PATCH digunakan untuk menerapkan modifikasi sebagian pada sumber daya.
-
- -

Spesifikasi

- - - - - - - - - - - - - - - - - - - -
SpesifikasiJudulKomentar
{{RFC("7231", "Request methods", "4")}}Hypertext Transfer Protocol (HTTP/1.1): Semantics and ContentSpecifies GET, HEAD, POST, PUT, DELETE, CONNECT, OPTIONS, TRACE.
{{RFC("5789", "Patch method", "2")}}PATCH Method for HTTPSpecifies PATCH.
- -

Kompabilitas Browser

- - - -

{{Compat("http.methods")}}

- -

Lihat Juga

- - diff --git a/files/id/web/http/overview/index.html b/files/id/web/http/overview/index.html deleted file mode 100644 index 580166ef43..0000000000 --- a/files/id/web/http/overview/index.html +++ /dev/null @@ -1,174 +0,0 @@ ---- -title: Gambaran HTTP -slug: Web/HTTP/Overview -translation_of: Web/HTTP/Overview -original_slug: Web/HTTP/Gambaran ---- -
{{HTTPSidebar}}
- -

HTTP adalah sebuah {{Glossary("protocol")}} yang memungkinkan pengambilan sumber daya, seperti dokumen HTML. Ini adalah dasar dari pertukaran data apa pun di Web dan itu adalah protokol client-server, yang berarti permintaan diprakarsai oleh penerima (Client), biasanya browser Web. Dokumen lengkap direkonstruksi dari berbagai sub-dokumen yang diambil, misalnya teks, deskripsi tata letak, gambar, video, skrip, dan banyak lagi.

- -

A Web document is the composition of different resources

- -

Client dan Server berkomunikasi dengan bertukar pesan individual (sebagai lawan aliran data). Pesan yang dikirim oleh Client, biasanya browser Web, disebut permintaan (requests) dan pesan yang dikirim oleh server sebagai jawaban disebut respons (responses)

- -

HTTP as an application layer protocol, on top of TCP (transport layer) and IP (network layer) and below the presentation layer.Dirancang pada awal 1990-an, HTTP adalah protokol yang dapat diperluas, yang telah berevolusi dari waktu ke waktu. Ini adalah lapisan aplikasi protokol yang dikirim melalui {{Glossary("TCP")}}, atau melalui koneksi TCP yang terenkripsi {{Glossary("TLS")}} meskipun begitu semua transportasi protokol yang terpercaya secara teori juga dapat digunakan. Karena sifatnya yang dapat diperluas, protokol ini digunakan tidak hanya untuk mengambil dokumen hiperteks, tetapi juga gambar dan video atau untuk memposting konten ke server, sama seperti hasil sebuah form HTML. HTTP juga dapat digunakan untuk mengambil bagian dokumen untuk memperbarui halaman Web sesuai permintaan.

- -

Components of HTTP-based systems

- -

HTTP is a client-server protocol: requests are sent by one entity, the user-agent (or a proxy on behalf of it). Most of the time the user-agent is a Web browser, but it can be anything, for example a robot that crawls the Web to populate and maintain a search engine index.

- -

Each individual request is sent to a server, which handles it and provides an answer, called the response. Between the client and the server there are numerous entities, collectively called {{Glossary("Proxy_server", "proxies")}}, which perform different operations and act as gateways or {{Glossary("Cache", "caches")}}, for example.

- -

Client server chain

- -

In reality, there are more computers between a browser and the server handling the request: there are routers, modems, and more. Thanks to the layered design of the Web, these are hidden in the network and transport layers. HTTP is on top, at the application layer. Although important to diagnose network problems, the underlying layers are mostly irrelevant to the description of HTTP.

- -

Client: the user-agent

- -

The user-agent is any tool that acts on the behalf of the user. This role is primarily performed by the Web browser; other possibilities are programs used by engineers and Web developers to debug their applications.

- -

The browser is always the entity initiating the request. It is never the server (though some mechanisms have been added over the years to simulate server-initiated messages).

- -

To present a Web page, the browser sends an original request to fetch the HTML document that represents the page. It then parses this file, making additional requests corresponding to execution scripts, layout information (CSS) to display, and sub-resources contained within the page (usually images and videos). The Web browser then mixes these resources to present to the user a complete document, the Web page. Scripts executed by the browser can fetch more resources in later phases and the browser updates the Web page accordingly.

- -

A Web page is a hypertext document. This means some parts of displayed text are links which can be activated (usually by a click of the mouse) to fetch a new Web page, allowing the user to direct their user-agent and navigate through the Web. The browser translates these directions in HTTP requests, and further interprets the HTTP responses to present the user with a clear response.

- -

The Web server

- -

On the opposite side of the communication channel, is the server, which serves the document as requested by the client. A server appears as only a single machine virtually: this is because it may actually be a collection of servers, sharing the load (load balancing) or a complex piece of software interrogating other computers (like cache, a DB server, or e-commerce servers), totally or partially generating the document on demand.

- -

A server is not necessarily a single machine, but several server software instances can be hosted on the same machine. With HTTP/1.1 and the {{HTTPHeader("Host")}} header, they may even share the same IP address.

- -

Proxies

- -

Between the Web browser and the server, numerous computers and machines relay the HTTP messages. Due to the layered structure of the Web stack, most of these operate at the transport, network or physical levels, becoming transparent at the HTTP layer and potentially making a significant impact on performance. Those operating at the application layers are generally called proxies. These can be transparent, forwarding on the requests they receive without altering them in any way, or non-transparent, in which case they will change the request in some way before passing it along to the server. Proxies may perform numerous functions:

- - - -

Basic aspects of HTTP

- -

HTTP is simple

- -

HTTP is generally designed to be simple and human readable, even with the added complexity introduced in HTTP/2 by encapsulating HTTP messages into frames. HTTP messages can be read and understood by humans, providing easier testing for developers, and reduced complexity for newcomers.

- -

HTTP is extensible

- -

Introduced in HTTP/1.0, HTTP headers make this protocol easy to extend and experiment with. New functionality can even be introduced by a simple agreement between a client and a server about a new header's semantics.

- -

HTTP is stateless, but not sessionless

- -

HTTP is stateless: there is no link between two requests being successively carried out on the same connection. This immediately has the prospect of being problematic for users attempting to interact with certain pages coherently, for example, using e-commerce shopping baskets. But while the core of HTTP itself is stateless, HTTP cookies allow the use of stateful sessions. Using header extensibility, HTTP Cookies are added to the workflow, allowing session creation on each HTTP request to share the same context, or the same state.

- -

HTTP and connections

- -

A connection is controlled at the transport layer, and therefore fundamentally out of scope for HTTP. Though HTTP doesn't require the underlying transport protocol to be connection-based; only requiring it to be reliable, or not lose messages (so at minimum presenting an error). Among the two most common transport protocols on the Internet, TCP is reliable and UDP isn't. HTTP therefore relies on the TCP standard, which is connection-based.

- -

Before a client and server can exchange an HTTP request/response pair, they must establish a TCP connection, a process which requires several round-trips. The default behavior of HTTP/1.0 is to open a separate TCP connection for each HTTP request/response pair. This is less efficient than sharing a single TCP connection when multiple requests are sent in close succession.

- -

In order to mitigate this flaw, HTTP/1.1 introduced pipelining (which proved difficult to implement) and persistent connections: the underlying TCP connection can be partially controlled using the {{HTTPHeader("Connection")}} header. HTTP/2 went a step further by multiplexing messages over a single connection, helping keep the connection warm and more efficient.

- -

Experiments are in progress to design a better transport protocol more suited to HTTP. For example, Google is experimenting with QUIC which builds on UDP to provide a more reliable and efficient transport protocol.

- -

What can be controlled by HTTP

- -

This extensible nature of HTTP has, over time, allowed for more control and functionality of the Web. Cache or authentication methods were functions handled early in HTTP history. The ability to relax the origin constraint, by contrast, has only been added in the 2010s.

- -

Here is a list of common features controllable with HTTP.

- - - -

HTTP flow

- -

When a client wants to communicate with a server, either the final server or an intermediate proxy, it performs the following steps:

- -
    -
  1. Open a TCP connection: The TCP connection is used to send a request, or several, and receive an answer. The client may open a new connection, reuse an existing connection, or open several TCP connections to the servers.
  2. -
  3. Send an HTTP message: HTTP messages (before HTTP/2) are human-readable. With HTTP/2, these simple messages are encapsulated in frames, making them impossible to read directly, but the principle remains the same. For example: -
    GET / HTTP/1.1
    -Host: developer.mozilla.org
    -Accept-Language: fr
    -
  4. -
  5. Read the response sent by the server, such as: -
    HTTP/1.1 200 OK
    -Date: Sat, 09 Oct 2010 14:28:02 GMT
    -Server: Apache
    -Last-Modified: Tue, 01 Dec 2009 20:18:22 GMT
    -ETag: "51142bc1-7449-479b075b2891b"
    -Accept-Ranges: bytes
    -Content-Length: 29769
    -Content-Type: text/html
    -
    -<!DOCTYPE html... (here comes the 29769 bytes of the requested web page)
    -
  6. -
  7. Close or reuse the connection for further requests.
  8. -
- -

If HTTP pipelining is activated, several requests can be sent without waiting for the first response to be fully received. HTTP pipelining has proven difficult to implement in existing networks, where old pieces of software coexist with modern versions. HTTP pipelining has been superseded in HTTP/2 with more robust multiplexing requests within a frame.

- -

HTTP Messages

- -

HTTP messages, as defined in HTTP/1.1 and earlier, are human-readable. In HTTP/2, these messages are embedded into a binary structure, a frame, allowing optimizations like compression of headers and multiplexing. Even if only part of the original HTTP message is sent in this version of HTTP, the semantics of each message is unchanged and the client reconstitutes (virtually) the original HTTP/1.1 request. It is therefore useful to comprehend HTTP/2 messages in the HTTP/1.1 format.

- -

There are two types of HTTP messages, requests and responses, each with its own format.

- -

Requests

- -

An example HTTP request:

- -

A basic HTTP request

- -

Requests consists of the following elements:

- - - -

Responses

- -

An example response:

- -

- -

Responses consist of the following elements:

- - - -

APIs based on HTTP

- -

The most commonly used API based on HTTP is the {{domxref("XMLHttpRequest")}} API, which can be used to exchange data between a {{Glossary("user agent")}} and a server. The modern {{domxref("Fetch API")}} provides the same features with a more powerful and flexible feature set.

- -

Another API, server-sent events, is a one-way service that allows a server to send events to the client, using HTTP as a transport mechanism. Using the {{domxref("EventSource")}} interface, the client opens a connection and establishes event handlers. The client browser automatically converts the messages that arrive on the HTTP stream into appropriate {{domxref("Event")}} objects, delivering them to the event handlers that have been registered for the events' {{domxref("Event.type", "type")}} if known, or to the {{domxref("EventSource.onmessage", "onmessage")}} event handler if no type-specific event handler was established.

- -

Conclusion

- -

HTTP is an extensible protocol that is easy to use. The client-server structure, combined with the ability to simply add headers, allows HTTP to advance along with the extended capabilities of the Web.

- -

Though HTTP/2 adds some complexity, by embedding HTTP messages in frames to improve performance, the basic structure of messages has stayed the same since HTTP/1.0. Session flow remains simple, allowing it to be investigated, and debugged with a simple HTTP message monitor.

diff --git a/files/id/web/http/proxy_servers_and_tunneling/index.html b/files/id/web/http/proxy_servers_and_tunneling/index.html deleted file mode 100644 index f035225649..0000000000 --- a/files/id/web/http/proxy_servers_and_tunneling/index.html +++ /dev/null @@ -1,100 +0,0 @@ ---- -title: Proxy servers and tunneling -slug: Web/HTTP/Proxy_servers_and_tunneling -tags: - - HTTP - - HTTP Tunneling - - NeedsTranslation - - Proxies - - Proxy - - TopicStub -translation_of: Web/HTTP/Proxy_servers_and_tunneling ---- -
{{HTTPSidebar}}
- -

When navigating through different networks of the Internet, proxy servers and HTTP tunnels are facilitating access to content on the World Wide Web. A proxy can be on the user's local computer, or anywhere between the user's computer and a destination server on the Internet. This page outlines some basics about proxies and introduces a few configuration options.

- -

There are two types of proxies: forward proxies (or tunnel, or gateway) and reverse proxies (used to control and protect access to a server for load-balancing, authentication, decryption or caching).

- -

Forward proxies

- -

A forward proxy, or gateway, or just "proxy" provides proxy services to a client or a group of clients. There are likely hundreds of thousands of open forward proxies on the Internet. They store and forward Internet services (like the DNS, or web pages) to reduce and control the bandwidth used by the group.

- -

Forward proxies can also be anonymous proxies and allow users to hide their IP address while browsing the Web or using other Internet services. TOR (The Onion Router), routes internet traffic through multiple proxies for anonymity.

- -

Reverse proxies

- -

As the name implies, a reverse proxy does the opposite of what a forward proxy does: A forward proxy acts on behalf of clients (or requesting hosts). Forward proxies can hide the identities of clients whereas reverse proxies can hide the identities of servers. Reverse proxies have several use cases, a few are:

- - - -

Forwarding client information through proxies

- -

Proxies can make requests appear as if they originated from the proxy's IP address. This can be useful if a proxy is used to provide client anonymity, but in other cases information from the original request is lost. The IP address of the original client is often used for debugging, statistics, or generating location-dependent content. A common way to disclose this information is by using the following HTTP headers:

- -

The standardized header:

- -
-
{{HTTPHeader("Forwarded")}}
-
Contains information from the client-facing side of proxy servers that is altered or lost when a proxy is involved in the path of the request.
-
- -

Or the de-facto standard versions:

- -
-
{{HTTPHeader("X-Forwarded-For")}} {{non-standard_inline}}
-
Identifies the originating IP addresses of a client connecting to a web server through an HTTP proxy or a load balancer.
-
{{HTTPHeader("X-Forwarded-Host")}} {{non-standard_inline}}
-
Identifies the original host requested that a client used to connect to your proxy or load balancer.
-
{{HTTPHeader("X-Forwarded-Proto")}} {{non-standard_inline}}
-
identifies the protocol (HTTP or HTTPS) that a client used to connect to your proxy or load balancer.
-
- -

To provide information about the proxy itself (not about the client connecting to it), the Via header can be used.

- -
-
{{HTTPHeader("Via")}}
-
Added by proxies, both forward and reverse proxies, and can appear in the request headers and the response headers.
-
- -

HTTP tunneling

- -

Tunneling transmits private network data and protocol information through public network by encapsulating the data. HTTP tunneling is using a protocol of higher level (HTTP) to transport a lower level protocol (TCP).

- -

The HTTP protocol specifies a request method called {{HTTPMethod("CONNECT")}}. It starts two-way communications with the requested resource and can be used to open a tunnel. This is how a client behind an HTTP proxy can access websites using SSL (i.e. HTTPS, port 443). Note, however, that not all proxy servers support the CONNECT method or limit it to port 443 only.

- -

See also the HTTP tunnel article on Wikipedia.

- -

Proxy Auto-Configuration (PAC)

- -

A Proxy Auto-Configuration (PAC) file is a JavaScript function that determines whether web browser requests (HTTP, HTTPS, and FTP) go directly to the destination or are forwarded to a web proxy server. The JavaScript function contained in the PAC file defines the function:

- -

The auto-config file should be saved to a file with a .pac filename extension:

- -
proxy.pac
- -

And the MIME type set to:

- -
application/x-ns-proxy-autoconfig
- -

The file consists of a function called FindProxyForURL. The example below will work in an environment where the internal DNS server is set up so that it can only resolve internal host names, and the goal is to use a proxy only for hosts that aren't resolvable:

- -
function FindProxyForURL(url, host) {
-  if (isResolvable(host))
-    return "DIRECT";
-  else
-    return "PROXY proxy.mydomain.com:8080";
-}
- -

See Proxy Auto-Configuration (PAC) for more examples.

- -

See also

- - diff --git a/files/id/web/http/proxy_servers_and_tunneling/proxy_auto-configuration_pac_file/index.html b/files/id/web/http/proxy_servers_and_tunneling/proxy_auto-configuration_pac_file/index.html deleted file mode 100644 index 340989a8d1..0000000000 --- a/files/id/web/http/proxy_servers_and_tunneling/proxy_auto-configuration_pac_file/index.html +++ /dev/null @@ -1,728 +0,0 @@ ---- -title: Proxy Auto-Configuration (PAC) file -slug: Web/HTTP/Proxy_servers_and_tunneling/Proxy_Auto-Configuration_PAC_file -translation_of: Web/HTTP/Proxy_servers_and_tunneling/Proxy_Auto-Configuration_(PAC)_file -original_slug: Web/HTTP/Proxy_servers_and_tunneling/Proxy_Auto-Configuration_(PAC)_file ---- -
{{HTTPSidebar}}
- -

File Proxy Auto-Configuration (PAC) adalah fungsi JavaScript yang menentukan apakah permintaan browser web (HTTP, HTTPS, dan FTP) langsung ke tujuan atau diteruskan ke server proxy web. Fungsi JavaScript yang terdapat dalam file PAC mendefinisikan fungsi tersebut:

- -
function FindProxyForURL(url, host) {
-  // ...
-}
- -

Sintaksis

- -
function FindProxyForURL(url, host)
- -

Parameter

- -
-
url
-
URL sedang diakses. Jalur dan komponen kueri https://URL dihilangkan. Di Chrome (versi 52 hingga 73), Anda dapat menonaktifkan ini dengan menyetel PacHttpsUrlStrippingEnabledke falsedalam kebijakan atau dengan meluncurkan dengan --unsafe-pac-urlbendera baris perintah (di Chrome 74, hanya bendera yang berfungsi, dan dari 75 dan seterusnya, tidak ada cara untuk menonaktifkan jalur- pengupasan; mulai Chrome 81, pengupasan jalur tidak berlaku untuk URL HTTP, tetapi ada minat untuk mengubah perilaku ini agar cocok dengan HTTPS); di Firefox, preferensinya adalah network.proxy.autoconfig_url.include_path.
-
host
-
Nama host diekstrak dari URL. Ini hanya untuk kenyamanan; itu adalah string yang sama seperti antara ://dan yang pertama :atau /setelah itu. Nomor port tidak termasuk dalam parameter ini. Ini dapat diekstrak dari URL bila perlu.
-
- -

Deskripsi

- -

Mengembalikan string yang menjelaskan konfigurasi. Format string ini ditentukan dalam format nilai pengembalian di bawah ini.

- -

Format nilai pengembalian

- - - -
-
DIRECT
-
Koneksi harus dibuat secara langsung, tanpa proxy apa pun
-
PROXY host:port
-
Proksi yang ditentukan harus digunakan
-
SOCKS host:port
-
Server SOCKS yang ditentukan harus digunakan
-
- -

Versi terbaru Firefox juga mendukung:

- -
-
HTTP host:port
-
Proksi yang ditentukan harus digunakan
-
HTTPS host:port
-
Proksi HTTPS yang ditentukan harus digunakan
-
SOCKS4 host:port
-
SOCKS5 host:port
-
Server SOCKS yang ditentukan (dengan versi SOCK yang ditentukan) harus digunakan
-
- -

Jika ada beberapa pengaturan yang dipisahkan titik koma, pengaturan paling kiri akan digunakan, sampai Firefox gagal membuat sambungan ke proxy. Dalam hal ini, nilai selanjutnya akan digunakan, dll.

- -

Browser akan secara otomatis mencoba proxy yang sebelumnya tidak merespons setelah 30 menit. Upaya tambahan akan berlanjut mulai dari satu jam, selalu menambahkan 30 menit ke waktu yang telah berlalu di antara upaya.

- -

Jika semua proxy sedang down, dan tidak ada opsi LANGSUNG yang ditentukan, browser akan menanyakan apakah proxy harus diabaikan untuk sementara, dan koneksi langsung diupayakan. Setelah 20 menit, browser akan menanyakan apakah proxy harus dicoba lagi, menanyakan lagi setelah 40 menit tambahan. Kueri akan berlanjut, selalu menambahkan 20 menit ke waktu yang telah berlalu di antara kueri.

- -

Contoh

- -
-
PROXY w3proxy.netscape.com:8080; PROXY mozilla.netscape.com:8081
-
Proksi utama adalah w3proxy: 8080; jika turun, mulailah menggunakan mozilla: 8081 hingga proxy utama muncul lagi.
-
PROXY w3proxy.netscape.com:8080; PROXY mozilla.netscape.com:8081; DIRECT
-
Sama seperti di atas, tetapi jika kedua proxy turun, secara otomatis mulai membuat koneksi langsung. (Pada contoh pertama di atas, Netscape akan menanyakan konfirmasi pengguna tentang membuat koneksi langsung; dalam hal ini, tidak ada intervensi pengguna.)
-
PROXY w3proxy.netscape.com:8080; SOCKS socks:1080
-
Gunakan SOCKS jika proxy utama mati.
-
- -

File konfigurasi otomatis harus disimpan ke file dengan ekstensi nama file .pac:

- -
proxy.pac
- -

Dan tipe MIME harus disetel ke:

- -
application/x-ns-proxy-autoconfig
- -

Selanjutnya, Anda harus mengkonfigurasi server Anda untuk memetakan ekstensi nama file .pac ke jenis MIME.

- -
-

Catatan:

- - -
- -

Fungsi dan lingkungan yang telah ditentukan sebelumnya

- -

Fungsi-fungsi ini dapat digunakan untuk membuat file PAC:

- - - -
-

Catatan: pactester (bagian dari paket pacparser ) digunakan untuk menguji contoh sintaks berikut.

- - -
- -

isPlainHostName ()

- -

Sintaksis

- -
isPlainHostName(host)
- -

Parameter

- -
-
tuan rumah
-
Nama host dari URL (tidak termasuk nomor port).
-
- -

Deskripsi

- -

Benar jika dan hanya jika tidak ada nama domain di nama host (tidak ada titik).

- -

Contoh

- -
isPlainHostName("www.mozilla.org") // false
-isPlainHostName("www") // true
-
- -

dnsDomainIs()

- -

Sintaksis

- -
dnsDomainIs(host, domain)
- -

Parameter

- -
-
tuan rumah
-
Apakah nama host dari URL.
-
domain
-
Apakah nama domain untuk menguji nama host.
-
- -

Deskripsi

- -

Mengembalikan nilai benar jika dan hanya jika domain nama host cocok.

- -

Contoh

- -
dnsDomainIs("www.mozilla.org", ".mozilla.org") // true
-dnsDomainIs("www", ".mozilla.org") // false
-
- -

localHostOrDomainIs ()

- -

Sintaksis

- -
localHostOrDomainIs(host, hostdom)
- -

Parameter

- -
-
tuan rumah
-
Nama host dari URL.
-
tuan rumah
-
Nama host yang sepenuhnya memenuhi syarat untuk dicocokkan.
-
- -

Deskripsi

- -

Benar jika nama host sama persis dengan nama host yang ditentukan, atau jika tidak ada bagian nama domain dalam nama host, tetapi nama host yang tidak memenuhi syarat cocok.

- -

Contoh

- -
localHostOrDomainIs("www.mozilla.org" , "www.mozilla.org") // true (exact match)
-localHostOrDomainIs("www"             , "www.mozilla.org") // true (hostname match, domain not specified)
-localHostOrDomainIs("www.google.com"  , "www.mozilla.org") // false (domain name mismatch)
-localHostOrDomainIs("home.mozilla.org", "www.mozilla.org") // false (hostname mismatch)
- -

isResolvable ()

- -

Sintaksis

- -
isResolvable(host)
- -

Parameter

- -
-
tuan rumah
-
adalah nama host dari URL.
-
- -

Mencoba menyelesaikan nama host. Mengembalikan nilai benar jika berhasil.

- -

Contoh:

- -
isResolvable("www.mozilla.org") // true
-
- -

isInNet ()

- -

Sintaksis

- -
isInNet(host, pattern, mask)
- -

Parameter

- -
-
tuan rumah
-
nama host DNS, atau alamat IP. Jika nama host dilewatkan, itu akan diselesaikan menjadi alamat IP dengan fungsi ini.
-
pola
-
pola alamat IP dalam format yang dipisahkan titik.
-
topeng
-
mask untuk pola alamat IP yang menginformasikan bagian mana dari alamat IP yang harus dicocokkan. 0 berarti abaikan, 255 berarti cocok.
-
- -

True jika dan hanya jika alamat IP dari host cocok dengan pola alamat IP yang ditentukan.

- -

Spesifikasi pola dan topeng dilakukan dengan cara yang sama seperti untuk konfigurasi SOCKS.

- -

Contoh:

- -
function alert_eval(str) { alert(str + ' is ' + eval(str)) }
-function FindProxyForURL(url, host) {
-  alert_eval('isInNet(host, "63.245.213.24", "255.255.255.255")')
-  // "PAC-alert: isInNet(host, "63.245.213.24", "255.255.255.255") is true"
-}
-
- -

dnsResolve ()

- -
dnsResolve(host)
- -

Parameter

- -
-
tuan rumah
-
nama host untuk diselesaikan.
-
- -

Menyelesaikan nama host DNS yang diberikan menjadi alamat IP, dan mengembalikannya dalam format yang dipisahkan titik sebagai string.

- -

Contoh

- -
dnsResolve("www.mozilla.org"); // returns the string "104.16.41.2"
- -

convert_addr ()

- -

Sintaksis

- -
convert_addr(ipaddr)
- -

Parameter

- -
-
ipaddr
-
Alamat bertitik apa pun seperti alamat IP atau topeng.
-
- -

Menggabungkan empat byte yang dipisahkan titik menjadi satu kata 4-byte dan mengubahnya menjadi desimal.

- -

Contoh

- -
convert_addr("104.16.41.2"); // returns the decimal number 1745889538
- -

myIpAddress ()

- -

Sintaksis

- -
myIpAddress()
- -

Parameter

- -

(tidak ada)

- -

Mengembalikan alamat IP server dari mesin tempat Firefox dijalankan, sebagai string dalam format bilangan bulat yang dipisahkan titik.

- -
-

myIpAddress () mengembalikan alamat IP yang sama dengan alamat server yang dikembalikan oleh nslookup localhost mesin Linux. Itu tidak mengembalikan alamat IP publik.

-
- -

Contoh

- -
myIpAddress() //returns the string "127.0.1.1" if you were running Firefox on that localhost
- -

dnsDomainLevels ()

- -

Sintaksis

- -
dnsDomainLevels(host)
- -

Parameter

- -
-
tuan rumah
-
adalah nama host dari URL.
-
- -

Mengembalikan angka (bilangan bulat) dari level domain DNS (jumlah titik) di nama host.

- -

Contoh:

- -
dnsDomainLevels("www");             // 0
-dnsDomainLevels("mozilla.org");     // 1
-dnsDomainLevels("www.mozilla.org"); // 2
-
- -

shExpMatch ()

- -

Sintaksis

- -
shExpMatch(str, shexp)
- -

Parameter

- -
-
str
-
adalah sembarang string untuk dibandingkan (mis. URL, atau nama host).
-
shexp
-
adalah ekspresi shell untuk dibandingkan.
-
- -

Mengembalikan nilai benar jika string cocok dengan ekspresi shell yang ditentukan.

- -

Perhatikan bahwa polanya adalah ekspresi shell glob , bukan ekspresi reguler. *dan ?selalu didukung, sementara [characters]dan [^characters]didukung oleh beberapa implementasi termasuk Firefox. Ini terutama karena ekspresi diterjemahkan ke RegExp melalui subsitusi [.*?]. Untuk cara yang dapat diandalkan untuk menggunakan sintaks RegExp ini, cukup gunakan RegExp sebagai gantinya.

- -

Contoh

- -
shExpMatch("http://home.netscape.com/people/ari/index.html"     , "*/ari/*"); // returns true
-shExpMatch("http://home.netscape.com/people/montulli/index.html", "*/ari/*"); // returns false
- -

weekdayRange ()

- -

Sintaksis

- -
weekdayRange(wd1, wd2, [gmt])
- -
-

Catatan: (Sebelum Firefox 49) wd1 harus lebih kecil dari wd2 jika Anda ingin fungsi mengevaluasi parameter ini sebagai rentang. Lihat peringatan di bawah.

-
- -

Parameter

- -
-
wd1 dan wd2
-
Salah satu string hari kerja yang dipesan:
-
-
"SUN"|"MON"|"TUE"|"WED"|"THU"|"FRI"|"SAT"
-
-
waktu Greenwich
-
Apakah string "GMT" atau ditinggalkan.
-
- -

Hanya parameter pertama yang wajib diisi. Entah yang kedua, ketiga, atau keduanya mungkin ditinggalkan.

- -

Jika hanya satu parameter yang ada, fungsi mengembalikan nilai true pada hari kerja yang diwakili oleh parameter. Jika string "GMT" ditetapkan sebagai parameter kedua, waktu dianggap dalam GMT. Jika tidak, mereka diasumsikan berada dalam zona waktu lokal.

- -

Jika wd1 dan wd1 ditentukan, kondisinya benar jika hari kerja saat ini berada di antara dua hari kerja yang dipesan . Batas bersifat inklusif, tetapi batasnya teratur . Jika parameter "GMT" ditentukan, waktu dianggap dalam GMT. Jika tidak, zona waktu lokal digunakan.

- -
-

Urutan hari penting ; Sebelum Firefox 49, akan selalu bernilai true. Sekarang hanya akan mengevaluasi benar jika hari ini adalah Rabu atau Minggu.weekdayRange("SUN", "SAT")weekdayRange("WED", "SUN")

-
- -

Contoh

- -
weekdayRange("MON", "FRI");        // returns true Monday through Friday (local timezone)
-weekdayRange("MON", "FRI", "GMT"); // returns true Monday through Friday (GMT timezone)
-weekdayRange("SAT");               // returns true on Saturdays local time
-weekdayRange("SAT", "GMT");        // returns true on Saturdays GMT time
-weekdayRange("FRI", "MON");        // returns true Friday and Monday only (note, order does matter!)
- -

dateRange()

- -

Syntax

- -
dateRange(<day> | <month> | <year>, [gmt])  // ambiguity is resolved by assuming year is greater than 31
-dateRange(<day1>, <day2>, [gmt])
-dateRange(<month1>, <month2>, [gmt])
-dateRange(<year1>, <year2>, [gmt])
-dateRange(<day1>, <month1>, <day2>, <month2>, [gmt])
-dateRange(<month1>, <year1>, <month2>, <year2>, [gmt])
-dateRange(<day1>, <month1>, <year1>, <day2>, <month2>, <year2>, [gmt])
- -
-

Note: (Before Firefox 49) day1 must be less than day2, month1 must be less than month2, and year1 must be less than year2 if you want the function to evaluate these parameters as a range. See the warning below.

-
- -

Parameters

- -
-
day
-
Is the ordered day of the month between 1 and 31 (as an integer).
-
- -
1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31
- -
-
month
-
Is one of the ordered month strings below.
-
- -
"JAN"|"FEB"|"MAR"|"APR"|"MAY"|"JUN"|"JUL"|"AUG"|"SEP"|"OCT"|"NOV"|"DEC"
- -
-
year
-
Is the ordered full year integer number. For example, 2016 (not 16).
-
gmt
-
Is either the string "GMT", which makes time comparison occur in GMT timezone, or is left out. If left unspecified, times are taken to be in the local timezone.
-
- -

Jika hanya satu nilai yang ditentukan (dari setiap kategori: hari, bulan, tahun), fungsi mengembalikan nilai sebenarnya hanya pada hari yang cocok dengan spesifikasi tersebut. Jika kedua nilai ditentukan, hasilnya adalah benar di antara waktu-waktu tersebut, termasuk batas, tetapi batasnya diurutkan .

- -
-

Urutan hari, bulan, dan tahun penting ; Sebelum Firefox 49, akan selalu mengevaluasi ke . Sekarang hanya akan mengevaluasi benar jika bulan ini adalah Desember atau Januari.dateRange("JAN", "DEC")truedateRange("DEC", "JAN")

-
- -

Contoh

- -
dateRange(1);            // returns true on the first day of each month, local timezone
-dateRange(1, "GMT")      // returns true on the first day of each month, GMT timezone
-dateRange(1, 15);        // returns true on the first half of each month
-dateRange(24, "DEC");    // returns true on 24th of December each year
-dateRange("JAN", "MAR"); // returns true on the first quarter of the year
-
-dateRange(1, "JUN", 15, "AUG");
-// returns true from June 1st until August 15th, each year
-// (including June 1st and August 15th)
-
-dateRange(1, "JUN", 1995, 15, "AUG", 1995);
-// returns true from June 1st, 1995, until August 15th, same year
-
-dateRange("OCT", 1995, "MAR", 1996);
-// returns true from October 1995 until March 1996
-// (including the entire month of October 1995 and March 1996)
-
-dateRange(1995);
-// returns true during the entire year of 1995
-
-dateRange(1995, 1997);
-// returns true from beginning of year 1995 until the end of year 1997
- -

rentang waktu()

- -

Sintaksis

- -
// The full range of expansions is analogous to dateRange.
-timeRange(<hour1>, <min1>, <sec1>, <hour2>, <min2>, <sec2>, [gmt])
- -
-

Catatan: (Sebelum Firefox 49) kategori hour1, min1, sec1 harus kurang dari kategori hour2, min2, sec2 jika Anda ingin fungsi mengevaluasi parameter ini sebagai rentang. Lihat peringatan di bawah.

-
- -

Parameter

- -
-
jam
-
Adalah jam dari 0 hingga 23. (0 adalah tengah malam, 23 adalah 11 malam.)
-
min
-
Menit dari 0 hingga 59.
-
detik
-
Detik dari 0 hingga 59.
-
waktu Greenwich
-
Baik string "GMT" untuk zona waktu GMT, atau tidak ditentukan, untuk zona waktu lokal.
-
- -

Jika hanya satu nilai yang ditentukan (dari setiap kategori: jam, menit, detik), fungsi mengembalikan nilai sebenarnya hanya pada waktu yang sesuai dengan spesifikasi tersebut. Jika kedua nilai ditentukan, hasilnya adalah benar di antara waktu-waktu tersebut, termasuk batas, tetapi batasnya diurutkan .

- -
-

Urutan jam, menit, materi kedua ; Sebelum Firefox 49, akan selalu bernilai true. Sekarang hanya akan mengevaluasi benar jika jam saat ini adalah 23:00 atau tengah malam.timeRange(0, 23)timeRange(23, 0)

-
- -

Contoh

- -
timerange(12);                // returns true from noon to 1pm
-timerange(12, 13);            // returns true from noon to 1pm
-timerange(12, "GMT");         // returns true from noon to 1pm, in GMT timezone
-timerange(9, 17);             // returns true from 9am to 5pm
-timerange(8, 30, 17, 00);     // returns true from 8:30am to 5:00pm
-timerange(0, 0, 0, 0, 0, 30); // returns true between midnight and 30 seconds past midnight
- -

Contoh 1

- -

Gunakan proxy untuk semuanya kecuali host lokal

- -
-

Catatan: Karena semua contoh berikut sangat spesifik, mereka belum diuji.

-
- -

All hosts which aren't fully qualified, or the ones that are in local domain, will be connected to directly. Everything else will go through w3proxy.mozilla.org:8080. If the proxy goes down, connections become direct automatically:

- -
function FindProxyForURL(url, host) {
-  if (isPlainHostName(host) || dnsDomainIs(host, ".mozilla.org")) {
-    return "DIRECT";
-  } else {
-    return "PROXY w3proxy.mozilla.org:8080; DIRECT";
-  }
-}
- -
-

Note: This is the simplest and most efficient autoconfig file for cases where there's only one proxy.

-
- -

Example 2

- -

As above, but use proxy for local servers which are outside the firewall

- -

If there are hosts (such as the main Web server) that belong to the local domain but are outside the firewall and are only reachable through the proxy server, those exceptions can be handled using the localHostOrDomainIs() function:

- -
function FindProxyForURL(url, host) {
-  if (
-    (isPlainHostName(host) || dnsDomainIs(host, ".mozilla.org")) &&
-    !localHostOrDomainIs(host, "www.mozilla.org") &&
-    !localHostOrDoaminIs(host, "merchant.mozilla.org")
-  ) {
-    return "DIRECT";
-  } else {
-    return "PROXY w3proxy.mozilla.org:8080; DIRECT";
-  }
-}
- -

The above example will use the proxy for everything except local hosts in the mozilla.org domain, with the further exception that hosts www.mozilla.org and merchant.mozilla.org will go through the proxy.

- -
-

Note the order of the above exceptions for efficiency: localHostOrDomainIs() functions only get executed for URLs that are in local domain, not for every URL. Be careful to note the parentheses around the or expression before the and expression to achieve the above-mentioned efficient behaviour.

-
- -

Example 3

- -

Use proxy only if cannot resolve host

- -

This example will work in an environment where the internal DNS server is set up so that it can only resolve internal host names, and the goal is to use a proxy only for hosts that aren't resolvable:

- -
function FindProxyForURL(url, host) {
-  if (isResolvable(host))
-    return "DIRECT";
-  else
-    return "PROXY proxy.mydomain.com:8080";
-}
- -

The above requires consulting the DNS every time; it can be grouped intelligently with other rules so that DNS is consulted only if other rules do not yield a result:

- -
function FindProxyForURL(url, host) {
-  if (
-    isPlainHostName(host) ||
-    dnsDomainIs(host, ".mydomain.com") ||
-    isResolvable(host)
-  ) {
-    return "DIRECT";
-  } else {
-    return "PROXY proxy.mydomain.com:8080";
-  }
-}
- -

Example 4

- -

Subnet based decisions

- -

In this example all of the hosts in a given subnet are connected-to directly, others are connected through the proxy:

- -
function FindProxyForURL(url, host) {
-  if (isInNet(host, "198.95.0.0", "255.255.0.0"))
-    return "DIRECT";
-  else
-    return "PROXY proxy.mydomain.com:8080";
-}
- -

Again, use of the DNS server in the above can be minimized by adding redundant rules in the beginning:

- -
function FindProxyForURL(url, host) {
-  if (
-    isPlainHostName(host) ||
-    dnsDomainIs(host, ".mydomain.com") ||
-    isInNet(host, "198.95.0.0", "255.255.0.0")
-  ) {
-    return "DIRECT";
-  } else {
-    return "PROXY proxy.mydomain.com:8080";
-  }
-}
- -

Example 5

- -

Load balancing/routing based on URL patterns

- -

This example is more sophisticated. There are four (4) proxy servers; one of them is a hot stand-by for all of the other ones, so if any of the remaining three goes down the fourth one will take over. Furthermore, the three remaining proxy servers share the load based on URL patterns, which makes their caching more effective (there is only one copy of any document on the three servers - as opposed to one copy on each of them). The load is distributed like this:

- - - - - - - - - - - - - - - - - - - - - - - - -
ProxyPurpose
#1.com domain
#2.edu domain
#3all other domains
#4hot stand-by
- -

All local accesses are desired to be direct. All proxy servers run on the port 8080 (they don't need to, you can just change your port but remember to modify your configuations on both side). Note how strings can be concatenated with the + operator in JavaScript.

- -
function FindProxyForURL(url, host) {
-
-  if (isPlainHostName(host) || dnsDomainIs(host, ".mydomain.com"))
-    return "DIRECT";
-
-  else if (shExpMatch(host, "*.com"))
-    return "PROXY proxy1.mydomain.com:8080; " +
-           "PROXY proxy4.mydomain.com:8080";
-
-  else if (shExpMatch(host, "*.edu"))
-    return "PROXY proxy2.mydomain.com:8080; " +
-           "PROXY proxy4.mydomain.com:8080";
-
-  else
-    return "PROXY proxy3.mydomain.com:8080; " +
-           "PROXY proxy4.mydomain.com:8080";
-}
- -

Example 6

- -

Setting a proxy for a specific protocol

- -

Most of the standard JavaScript functionality is available for use in the FindProxyForURL() function. As an example, to set different proxies based on the protocol the {{jsxref("String.prototype.startsWith()", "startsWith()")}} function can be used:

- -
function FindProxyForURL(url, host) {
-
-  if (url.startsWith("http:"))
-    return "PROXY http-proxy.mydomain.com:8080";
-
-  else if (url.startsWith("ftp:"))
-    return "PROXY ftp-proxy.mydomain.com:8080";
-
-  else if (url.startsWith(“gopher:"))
-    return "PROXY gopher-proxy.mydomain.com:8080";
-
-  else if (url.startsWith("https:") || url.startsWith("snews:"))
-    return "PROXY security-proxy.mydomain.com:8080";
-
-  else
-    return "DIRECT";
-
-}
- -
-

Note: The same can be accomplished using the shExpMatch() function described earlier.

-
- -

For example:

- -
// ...
-if (shExpMatch(url, "http:*")) {
-  return "PROXY http-proxy.mydomain.com:8080";
-}
-// ...
- -
-

The autoconfig file can be output by a CGI script. This is useful, for example, when making the autoconfig file act differently based on the client IP address (the REMOTE_ADDR environment variable in CGI).

- -

Usage of isInNet(), isResolvable() and dnsResolve() functions should be carefully considered, as they require the DNS server to be consulted. All the other autoconfig-related functions are mere string-matching functions that don't require the use of a DNS server. If a proxy is used, the proxy will perform its DNS lookup which would double the impact on the DNS server. Most of the time these functions are not necessary to achieve the desired result.

-
- -

History and implementation

- -

Proxy auto-config was introduced into Netscape Navigator 2.0 in the late 1990s, at the same time when JavaScript was introduced. Open-sourcing Netscape eventually lead to Firefox itself.

- -

Oleh karena itu, implementasi PAC yang paling "asli" dan pustaka JavaScript-nya nsProxyAutoConfig.jsditemukan di versi awal Firefox. Utilitas ini ditemukan di banyak sistem sumber terbuka lainnya termasuk Chromium . Firefox kemudian mengintegrasikan file tersebut menjadi ProxyAutoConfig.cppliteral string C ++. Untuk mengekstraknya ke dalam filenya sendiri, cukup dengan menyalin potongan ke JavaScript dengan console.logperintah untuk mencetaknya.

- -

Microsoft secara umum membuat implementasinya sendiri. Dulu ada beberapa masalah dengan pustaka mereka , tetapi sebagian besar telah diselesaikan sekarang. Mereka telah mendefinisikan beberapa fungsi sufiks "Ex" baru di sekitar bagian penanganan alamat untuk mendukung IPv6. Fitur ini didukung oleh Chromium, tetapi belum didukung oleh Firefox ( bugzilla # 558253 ).

diff --git a/files/id/web/http/status/100/index.html b/files/id/web/http/status/100/index.html deleted file mode 100644 index 3f2f0db1d2..0000000000 --- a/files/id/web/http/status/100/index.html +++ /dev/null @@ -1,46 +0,0 @@ ---- -title: 100 Continue -slug: Web/HTTP/Status/100 -tags: - - HTTP - - Informasi - - Status code -translation_of: Web/HTTP/Status/100 ---- -
{{HTTPSidebar}}
- -

HTTP 100 Continue menginformasikan status kode respon yang menandakan bahwa semuanya OK dan klien dapat melanjutkan dengan permintaan atau mengabaikan jika telah terselesaikan.

- -

Untuk bisa mendapatkan server check pada header permintaan, klien harus mengirim Expect: 100-continue sebagai header pada permintaan inisial dan mendapatan kode status respon 100 Continue sebelum mengirim konten atau body.

- -

Status

- -
100 Continue
- -

Spesifikasi

- - - - - - - - - - - - -
SpesifikasiTitle
{{RFC("7231", "100 Continue" , "6.2.1")}}Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content
- -

Kompabilitas Browser

- - - -

{{Compat("http/status", "100")}}

- -

Lihat Juga

- - diff --git a/files/id/web/http/status/200/index.html b/files/id/web/http/status/200/index.html deleted file mode 100644 index 76c06a3e1e..0000000000 --- a/files/id/web/http/status/200/index.html +++ /dev/null @@ -1,50 +0,0 @@ ---- -title: 200 OK -slug: Web/HTTP/Status/200 -translation_of: Web/HTTP/Status/200 ---- -
{{HTTPSidebar}}
- -

HTTP 200 OK respon status sukses merupakan kode respon yang menandakan bahwa request sukses. respon 200 dapat dichace secara default.

- -

Arti dari sukses tergantung pada fungsi request HTTP:

- - - -

Kesuksesan hasil dari {{HTTPMethod("PUT")}} atau {{HTTPMethod("DELETE")}} biasanya bukan 200 OK tapi {{HTTPStatus("204")}} No Content (atau {{HTTPStatus("201")}} Created ketika resource diunggah pertama kali).

- -

Status

- -
200 OK
- -

Spesifikasi

- - - - - - - - - - - - -
SpesifikasiJudul
{{RFC("7231", "200 OK" , "6.3.1")}}Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content
- -

Kompabilitas Browser

- - - -

{{Compat("http.status.200")}}

- -

Lihat Juga

- - diff --git a/files/id/web/http/status/400/index.html b/files/id/web/http/status/400/index.html deleted file mode 100644 index 3d98750338..0000000000 --- a/files/id/web/http/status/400/index.html +++ /dev/null @@ -1,39 +0,0 @@ ---- -title: 400 Bad Request -slug: Web/HTTP/Status/400 -tags: - - Galat Klien - - HTTP - - Kode status - - Referensi - - Status kode HTTP -translation_of: Web/HTTP/Status/400 ---- -
{{HTTPSidebar}}
- -

Kode Respon HTTP 400 Bad Request mengindikasikan bahwa server tidak bisa atau tidak akan memproses permintaan karena sesuatu yang dianggap sebagai kesalahan klien (seperti sintaks permintaan yang jelek, pesan request yang tidak valid, atau permintaan yang menipu.

- -
-

Klien seharusnya tidak mengulangi permintaan yang sama tanpa perubahan.

-
- -

Status

- -
400 Bad Request 
- -

Spesifikasi

- - - - - - - - - - - - - - -
SpecificationTitle
{{RFC("7231", "400 Bad Request" , "6.5.1")}}Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content
diff --git a/files/id/web/http/status/403/index.html b/files/id/web/http/status/403/index.html deleted file mode 100644 index 71dc858a2f..0000000000 --- a/files/id/web/http/status/403/index.html +++ /dev/null @@ -1,56 +0,0 @@ ---- -title: 403 Forbidden -slug: Web/HTTP/Status/403 -tags: - - Galat Klien - - HTTP - - Kode status - - Referensi -translation_of: Web/HTTP/Status/403 ---- -
{{HTTPSidebar}}
- -

Kode respon HTTP 403 Forbidden mengindikasikan bahwa server memahami permintaan tetapi menolak untuk mengesahkannya.

- -

Kode status ini mirip dengan {{HTTPStatus("401")}}, tetapi dalam kasus ini, autentikasi ulang tidak akan memberi perubahan. Aksesnya dilarang secara permanen dan diikat pada logika aplikasi, seperti kurangnya hak akses untuk mendapatkan sumber daya.

- -

Status

- -
403 Forbidden
- -

Contoh respon

- -
HTTP/1.1 403 Forbidden
-Date: Wed, 21 Oct 2015 07:28:00 GMT
-
- -

Spesifikasi

- - - - - - - - - - - - - - -
SpecificationTitle
{{RFC("7231", "403 Forbidden" , "6.5.3")}}HTTP/1.1: Semantics and Content
- -

Dukungan peramban

- - - -

{{Compat("http.status.403")}}

- -

Lihat juga

- - diff --git a/files/id/web/http/status/404/index.html b/files/id/web/http/status/404/index.html deleted file mode 100644 index 10c1e4e0a5..0000000000 --- a/files/id/web/http/status/404/index.html +++ /dev/null @@ -1,63 +0,0 @@ ---- -title: 404 Not Found -slug: Web/HTTP/Status/404 -tags: - - Galat Klien - - HTTP - - Kode status - - Peramban -translation_of: Web/HTTP/Status/404 ---- -
{{HTTPSidebar}}
- -

Kode respon HTTP 404 Not Found mengindikasikan bahwa server tidak dapat menemukan sumber daya yang diminta. Link yang menuju halaman 404 biasanya disebut dengan broken atau dead links, dan bisa menjadi subjek kepada link rot.

- -

Status kode 404 tidak mengindikasikan bahwa sumber daya tidak ditemukan sementara atau secara permanen. Apabila sumber daya dihapus secara permanen, {{HTTPStatus("410")}} (Gone) harus digunakan dibandingkan status 404.

- -

Status

- -
404 Not Found
- -

Halaman galat khusus

- -

Banyak web sites menyesuaikan tampilan dari halaman 404 supaya lebih membantu pengguna dan memberikan petunjuk apa yang harus dilakukan seterusnya. Server Apache dapat dikonfigurasi dengan file .htaccess dengan potongan kode berikut.

- -
ErrorDocument 404 /notfound.html
- -

Untuk contoh dari halaman 404 khusus, lihat Halaman 404 MDN.

- -
-

Desain khusus merupakan hal yang baik. Buat halaman 404 Anda menjadi lucu dan manusiawi, tetapi jangan membuat bingung pengguna.

-
- -

Spesifikasi

- - - - - - - - - - - - - - -
SpecificationTitle
{{RFC("7231", "404 Not Found" , "6.5.4")}}Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content
- -

Dukungan Peramban

- - - -

{{Compat("http.status.404")}}

- -

Lihat Juga

- - diff --git a/files/id/web/http/status/405/index.html b/files/id/web/http/status/405/index.html deleted file mode 100644 index 651db0f858..0000000000 --- a/files/id/web/http/status/405/index.html +++ /dev/null @@ -1,44 +0,0 @@ ---- -title: 405 Metode tidak Diizinkan -slug: Web/HTTP/Status/405 -tags: - - Galat Klien - - HTTP - - Referensi - - Status kode - - Status kode HTTP -translation_of: Web/HTTP/Status/405 ---- -
{{HTTPSidebar}}
- -

Kode respon HTTP 405 Method Not Allowed mengindikasikan bahwa metode permintaan dikenali oleh server tetapi tidak didukung oleh target sumber daya. Server harus menyematkan Allow header field di dalam respon 405 berisi daftar dari metode permintaan yang didukung oleh target sumber daya.

- -

Status

- -
405 Method Not Allowed
- -

Spesifikasi

- - - - - - - - - - - - - - -
SpecificationTitle
{{RFC("7231", "405 Method Not Allowed" , "6.5.5")}}Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content
- -

Lihat juga

- - diff --git a/files/id/web/http/status/410/index.html b/files/id/web/http/status/410/index.html deleted file mode 100644 index 42ac089598..0000000000 --- a/files/id/web/http/status/410/index.html +++ /dev/null @@ -1,54 +0,0 @@ ---- -title: 410 Gone -slug: Web/HTTP/Status/410 -tags: - - Galat Klien - - HTTP - - Kode status - - Referensi -translation_of: Web/HTTP/Status/410 ---- -
{{HTTPSidebar}}
- -

Kode respon HTTP 410 Gone mengindikasikan bahwa akses ke sumber daya tidak lagi tersedia di server asal dengan kondisi akan tidak tersedia secara permanen.

- -

Apabila Anda tidak tahu apakah kondisi ini hanya sementara atau permanen, kode error {{HTTPStatus(404)}} sebaiknya digunakan.

- -
-

Catatan: Sebuah respon 410 dapat disimpan di dalam cache secara bawaan.

-
- -

Status

- -
410 Gone
- -

Spesifikasi

- - - - - - - - - - - - - - -
SpecificationTitle
{{RFC("7231", "410 Gone" , "6.5.9")}}Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content
- -

Dukungan Peramban

- -

The information shown below has been pulled from MDN's GitHub (https://github.com/mdn/browser-compat-data).

- - - -

{{Compat("http.status.410")}}

- -

Lihat Juga

- - diff --git a/files/id/web/http/status/500/index.html b/files/id/web/http/status/500/index.html deleted file mode 100644 index ce5c5157fb..0000000000 --- a/files/id/web/http/status/500/index.html +++ /dev/null @@ -1,38 +0,0 @@ ---- -title: 500 Internal Server Error -slug: Web/HTTP/Status/500 -translation_of: Web/HTTP/Status/500 ---- -
{{HTTPSidebar}}
- -

HTTP kode respons kesalahan server menunjukkan bahwa server mengalami kondisi tak terduga yang menghalanginya memenuhi permintaan.

- -

Respons kesalahan ini adalah turunan "mencakup-semua" respons. Seringkali respons server pengelola catatan seperti kode status 500 dengan lebih banyak detail tentang permintaan untuk mencegah kesalahan terjadi lagi di masa mendatang.

- -

Status

- -
500 Kesalahan Server dari Dalam
-
- -

Specifications

- - - - - - - - - - - - -
SpecificationTitle
{{RFC("7231", "" , "6.6.1")}}Protokol Transfer Hiperteks (HTTP / 1.1): Semantik dan Konten
- -

Kompatibilias browser

- - - - - -

{{Compat("http.status.500")}}

diff --git a/files/id/web/http/status/index.html b/files/id/web/http/status/index.html deleted file mode 100644 index 066d40771e..0000000000 --- a/files/id/web/http/status/index.html +++ /dev/null @@ -1,141 +0,0 @@ ---- -title: HTTP response status codes -slug: Web/HTTP/Status -translation_of: Web/HTTP/Status ---- -
{{HTTPSidebar}}
- -

kode status respon HTTP menunjukkan apakah permintaan HTTP tertentu telah berhasil diselesaikan. Tanggapan dikelompokkan dalam lima kelas: tanggapan informasi, tanggapan yang sukses, pengalihan, kesalahan klien, dan server kesalahan.

- -

Respon informasi

- -
-
{{HTTPStatus(100, "100 Continue")}}
-
Tanggapan sementara ini menunjukkan bahwa segala sesuatu sejauh ini adalah OK dan bahwa klien harus melanjutkan dengan permintaan atau mengabaikannya jika sudah selesai.
-
{{HTTPStatus(101, "101 Switching Protocol")}}
-
Kode ini dikirim sebagai tanggapan ke header permintaan {{HTTPHeader ("Upgrade")}} oleh klien, dan menunjukkan protokol yang digunakan oleh server.
-
{{HTTPStatus(102, "102 Processing")}} ({{Glossary("WebDAV")}})
-
Kode ini menunjukkan bahwa server telah menerima dan memproses permintaan, tetapi belum ada respons.
-
- -

Response Sukses

- -
-
{{HTTPStatus(200, "200 OK")}}
-
Permintaan telah berhasil . Arti keberhasilan bervariasi tergantung pada metode HTTP :
- GET: The resource has been fetched and is transmitted in the message body.
- HEAD: The entity headers are in the message body.
- POST: The resource describing the result of the action is transmitted in the message body.
- TRACE: The message body contains the request message as received by the server
-
{{HTTPStatus(201, "201 Created")}}
-
The request has succeeded and a new resource has been created as a result of it. This is typically the response sent after a PUT request.
-
{{HTTPStatus(202, "202 Accepted")}}
-
The request has been received but not yet acted upon. It is non-committal, meaning that there is no way in HTTP to later send an asynchronous response indicating the outcome of processing the request. It is intended for cases where another process or server handles the request, or for batch processing.
-
{{HTTPStatus(203, "203 Non-Authoritative Information")}}
-
This response code means returned meta-information set is not exact set as available from the origin server, but collected from a local or a third party copy. Except this condition, 200 OK response should be preferred instead of this response.
-
{{HTTPStatus(204, "204 No Content")}}
-
There is no content to send for this request, but the headers may be useful. The user-agent may update its cached headers for this resource with the new ones.
-
{{HTTPStatus(205, "205 Reset Content")}}
-
This response code is sent after accomplishing request to tell user agent reset document view which sent this request.
-
{{HTTPStatus(206, "206 Partial Content")}}
-
This response code is used because of range header sent by the client to separate download into multiple streams.
-
- -

Redirection messages

- -
-
{{HTTPStatus(300, "300 Multiple Choice")}}
-
The request has more than one possible responses. User-agent or user should choose one of them. There is no standardized way to choose one of the responses.
-
{{HTTPStatus(301, "301 Moved Permanently")}}
-
This response code means that URI of requested resource has been changed. Probably, new URI would be given in the response.
-
{{HTTPStatus(302, "302 Found")}}
-
This response code means that URI of requested resource has been changed temporarily. New changes in the URI might be made in the future. Therefore, this same URI should be used by the client in future requests.
-
{{HTTPStatus(303, "303 See Other")}}
-
Server sent this response to directing client to get requested resource to another URI with an GET request.
-
{{HTTPStatus(304, "304 Not Modified")}}
-
This is used for caching purposes. It is telling to client that response has not been modified. So, client can continue to use same cached version of response.
-
{{HTTPStatus(305, "305 Use Proxy")}}
-
This means requested response must be accessed by a proxy. This response code is not largely supported because security reasons.
-
{{HTTPStatus(306, "306 unused")}}
-
This response code is no longer used, it is just reserved currently. It was used in a previous version of the HTTP 1.1 specification.
-
{{HTTPStatus(307, "307 Temporary Redirect")}}
-
Server sent this response to directing client to get requested resource to another URI with same method that used prior request. This has the same semantic than the 302 Found HTTP response code, with the exception that the user agent must not change the HTTP method used: if a POST was used in the first request, a POST must be used in the second request.
-
{{HTTPStatus(308, "308 Permanent Redirect")}}
-
This means that the resource is now permanently located at another URI, specified by the Location: HTTP Response header. This has the same semantics as the 301 Moved Permanently HTTP response code, with the exception that the user agent must not change the HTTP method used: if a POST was used in the first request, a POST must be used in the second request.
-
- -

Client error responses

- -
-
{{HTTPStatus(400, "400 Bad Request")}}
-
Respons ini berarti server tidak dapat memahami permintaan karena sintaks yang tidak valid.
-
{{HTTPStatus(401, "401 Unauthorized")}}
-
Authentication is needed to get requested response. This is similar to 403, but in this case, authentication is possible.
-
{{HTTPStatus(402, "402 Payment Required")}}
-
This response code is reserved for future use. Initial aim for creating this code was using it for digital payment systems however this is not used currently.
-
{{HTTPStatus(403, "403 Forbidden")}}
-
Client does not have access rights to the content so server is rejecting to give proper response.
-
{{HTTPStatus(404, "404 Not Found")}}
-
Server can not find requested resource. This response code probably is most famous one due to its frequency to occur in web.
-
{{HTTPStatus(405, "405 Method Not Allowed")}}
-
The request method is known by the server but has been disabled and cannot be used. The two mandatory methods, GET and HEAD, must never be disabled and should not return this error code.
-
{{HTTPStatus(406, "406 Not Acceptable")}}
-
This response is sent when the web server, after performing server-driven content negotiation, doesn't find any content following the criteria given by the user agent.
-
{{HTTPStatus(407, "407 Proxy Authentication Required")}}
-
This is similar to 401 but authentication is needed to be done by a proxy.
-
{{HTTPStatus(408, "408 Request Timeout")}}
-
This response is sent on an idle connection by some servers, even without any previous request by the client. It means that the server would like to shut down this unused connection. This response is used much more since some browsers, like Chrome or IE9, use HTTP preconnection mechanisms to speed up surfing (see {{ bug(634278) }}, which tracks the future implementation of such a mechanism in Firefox). Also note that some servers merely shut down the connection without sending this message.
-
{{HTTPStatus(409, "409 Conflict")}}
-
This response would be sent when a request conflict with current state of server.
-
{{HTTPStatus(410, "410 Gone")}}
-
This response would be sent when requested content has been deleted from server.
-
{{HTTPStatus(411, "411 Length Required")}}
-
Server rejected the request because the Content-Length header field is not defined and the server requires it.
-
{{HTTPStatus(412, "412 Precondition Failed")}}
-
The client has indicated preconditions in its headers which the server does not meet.
-
{{HTTPStatus(413, "413 Payload Too Large")}}
-
Request entity is larger than limits defined by server; the server might close the connection or return an Retry-After header field.
-
{{HTTPStatus(414, "414 URI Too Long")}}
-
The URI requested by the client is longer than the server is willing to interpret.
-
{{HTTPStatus(415, "415 Unsupported Media Type")}}
-
The media format of the requested data is not supported by the server, so the server is rejecting the request.
-
{{HTTPStatus(416, "416 Requested Range Not Satisfiable")}}
-
The range specified by the Range header field in the request can't be fulfilled; it's possible that the range is outside the size of the target URI's data.
-
{{HTTPStatus(417, "417 Expectation Failed")}}
-
This response code means the expectation indicated by the Expect request header field can't be met by the server.
-
{{HTTPStatus(421, "421 Misdirected Request")}}
-
The request was directed at a server that is not able to produce a response. This can be sent by a server that is not configured to produce responses for the combination of scheme and authority that are included in the request URI.
-
{{HTTPStatus(426, "426 Upgrade Required")}}
-
The server refuses to perform the request using the current protocol but might be willing to do so after the client upgrades to a different protocol. The server MUST send an Upgrade header field in a 426 response to indicate the required protocol(s) (Section 6.7 of [RFC7230]).
-
{{HTTPStatus(428, "428 Precondition Required")}}
-
The origin server requires the request to be conditional. Intended to prevent "the 'lost update' problem, where a client GETs a resource's state, modifies it, and PUTs it back to the server, when meanwhile a third party has modified the state on the server, leading to a conflict.
-
{{HTTPStatus(429, "429 Too Many Requests")}}
-
The user has sent too many requests in a given amount of time ("rate limiting").
-
{{HTTPStatus(431, "431 Request Header Fields Too Large")}}
-
The server is unwilling to process the request because its header fields are too large. The request MAY be resubmitted after reducing the size of the request header fields.
-
{{HTTPStatus(451, "451 Unavailable For Legal Reasons")}}
-
The user requests an illegal resource, such as a web page censored by a government.
-
- -

Server error responses

- -
-
{{HTTPStatus(500, "500 Internal Server Error")}}
-
The server has encountered a situation it doesn't know how to handle.
-
{{HTTPStatus(501, "501 Not Implemented")}}
-
The request method is not supported by the server and cannot be handled. The only methods that servers are required to support (and therefore that must not return this code) are GET and HEAD.
-
{{HTTPStatus(502, "502 Bad Gateway")}}
-
This error response means that the server, while working as a gateway to get a response needed to handle the request, got an invalid response.
-
{{HTTPStatus(503, "503 Service Unavailable")}}
-
The server is not ready to handle the request. Common causes are a server that is down for maintenance or that is overloaded. Note that together with this response, a user-friendly page explaining the problem should be sent. This responses should be used for temporary conditions and the Retry-After: HTTP header should, if possible, contain the estimated time before the recovery of the service. The webmaster must also take care about the caching-related headers that are sent along with this response, as these temporary condition responses should usually not be cached.
-
{{HTTPStatus(504, "504 Gateway Timeout")}}
-
This error response is given when the server is acting as a gateway and cannot get a response in time.
-
{{HTTPStatus(505, "505 HTTP Version Not Supported")}}
-
The HTTP version used in the request is not supported by the server.
-
{{HTTPStatus(506, "506 Variant Also Negotiates")}}
-
The server has an internal configuration error: transparent content negotiation for the request results in a circular reference.
-
{{HTTPStatus(507, "507 Variant Also Negotiates")}}
-
The server has an internal configuration error: the chosen variant resource is configured to engage in transparent content negotiation itself, and is therefore not a proper end point in the negotiation process.
-
{{HTTPStatus(511, "511 Network Authentication Required")}}
-
The 511 status code indicates that the client needs to authenticate to gain network access.
-
-- cgit v1.2.3-54-g00ecf