(events[i].data.ptr));
+ ++i;
+ if (!g_run)
+ break;
+ }
+ }
+}
diff --git a/srcs/webserv/signal.cpp b/srcs/webserv/signal.cpp
new file mode 100644
index 0000000..1074f26
--- /dev/null
+++ b/srcs/webserv/signal.cpp
@@ -0,0 +1,29 @@
+
+#include "Webserv.hpp"
+
+bool g_run;
+int g_last_signal;
+
+void signal_handler(int signum)
+{
+ g_last_signal = signum;
+}
+
+void Webserv::_handle_last_signal()
+{
+ if (g_last_signal == SIGPIPE)
+ {
+ std::cerr << "SIGPIPE\n";
+ // if (_actual_client)
+ // {
+ // _close_client(_actual_client->fd);
+ // _actual_client = NULL;
+ // }
+ }
+ else if (g_last_signal == SIGINT)
+ {
+ g_run = false;
+ // maybe a throw here instead of "g_run" ?
+ }
+ g_last_signal = 0;
+}
diff --git a/website/index.html b/website/index.html
new file mode 100644
index 0000000..bc65643
--- /dev/null
+++ b/website/index.html
@@ -0,0 +1,11 @@
+
+
+
+ Le Webserv
+
+
+ Le index (˘ ͜ʖ˘)
+
+ (˚3˚)
+
+
\ No newline at end of file
diff --git a/website/rfc2119_no_link.html b/website/rfc2119_no_link.html
new file mode 100644
index 0000000..eec8fe5
--- /dev/null
+++ b/website/rfc2119_no_link.html
@@ -0,0 +1,300 @@
+
+
+
+ rfc2119
+
+
+
+
+ Network Working Group S. Bradner
+Request for Comments: 2119 Harvard University
+BCP: 14 March 1997
+Category: Best Current Practice
+
+
+ Key words for use in RFCs to Indicate Requirement Levels
+
+Status of this Memo
+
+ This document specifies an Internet Best Current Practices for the
+ Internet Community, and requests discussion and suggestions for
+ improvements. Distribution of this memo is unlimited.
+
+Abstract
+
+ In many standards track documents several words are used to signify
+ the requirements in the specification. These words are often
+ capitalized. This document defines these words as they should be
+ interpreted in IETF documents. Authors who follow these guidelines
+ should incorporate this phrase near the beginning of their document:
+
+ The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL Expand
+ NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT
+ RECOMMENDED", "MAY", and "OPTIONAL" in this document are to
+ be interpreted as described in RFC 2119.
+
+
EID 499 (Verified) is as follows:
+
+Section: Abstract
+
+Original Text:
+
+ The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL
+ NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and
+ "OPTIONAL" in this document are to be interpreted as described in
+ RFC 2119.
+
+Corrected Text:
+
+ The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL
+ NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT
+ RECOMMENDED", "MAY", and "OPTIONAL" in this document are to
+ be interpreted as described in RFC 2119.
+
+
Notes:
+The phrase "NOT RECOMMENDED" is missing from this sentence.
+
+
+ Note that the force of these words is modified by the requirement
+ level of the document in which they are used.
+
+1. MUST This word, or the terms "REQUIRED" or "SHALL", means that the Expand
+ definition is an absolute requirement of the specification.
+
+
EID 493 (Verified) is as follows:
+
+Section: 1
+
+Original Text:
+
+2. MUST NOT This phrase, or the phrase "SHALL NOT", mean that the
+ definition is an absolute prohibition of the specification.
+
+Corrected Text:
+
+2. MUST NOT This phrase, or the phrase "SHALL NOT", means that the
+ definition is an absolute prohibition of the specification.
+
+
Notes:
+
+
+
+
EID 498 (Verified) is as follows:
+
+Section: 1
+
+Original Text:
+
+4. SHOULD NOT This phrase, or the phrase "NOT RECOMMENDED" mean that
+ there may exist valid reasons in particular circumstances when the
+ particular behavior is acceptable or even useful, but the full
+ implications should be understood and the case carefully weighed
+ before implementing any behavior described with this label.
+
+Corrected Text:
+
+4. SHOULD NOT This phrase, or the phrase "NOT RECOMMENDED", means that
+ there may exist valid reasons in particular circumstances when the
+ particular behavior is acceptable or even useful, but the full
+ implications should be understood and the case carefully weighed
+ before implementing any behavior described with this label.
+
+
Notes:
+
+
+
+
EID 500 (Verified) is as follows:
+
+Section: 1
+
+Original Text:
+
+3. SHOULD This word, or the adjective "RECOMMENDED", mean that there
+ may exist valid reasons in particular circumstances to ignore a
+ particular item, but the full implications must be understood and
+ carefully weighed before choosing a different course.
+
+Corrected Text:
+
+3. SHOULD This word, or the adjective "RECOMMENDED", means that there
+ may exist valid reasons in particular circumstances to ignore a
+ particular item, but the full implications must be understood and
+ carefully weighed before choosing a different course.
+
+
Notes:
+
+
+
+
+
EID 495 (Verified) is as follows:
+
+Section: 1
+
+Original Text:
+
+1. MUST This word, or the terms "REQUIRED" or "SHALL", mean that the
+ definition is an absolute requirement of the specification.
+
+
+Corrected Text:
+
+1. MUST This word, or the terms "REQUIRED" or "SHALL", means that the
+ definition is an absolute requirement of the specification.
+
+
Notes:
+
+
+
+2. MUST NOT This phrase, or the phrase "SHALL NOT", mean that the
+ definition is an absolute prohibition of the specification.
+
+3. SHOULD This word, or the adjective "RECOMMENDED", mean that there
+ may exist valid reasons in particular circumstances to ignore a
+ particular item, but the full implications must be understood and
+ carefully weighed before choosing a different course.
+
+4. SHOULD NOT This phrase, or the phrase "NOT RECOMMENDED" mean that
+ there may exist valid reasons in particular circumstances when the
+ particular behavior is acceptable or even useful, but the full
+ implications should be understood and the case carefully weighed
+ before implementing any behavior described with this label.
+
+5. MAY This word, or the adjective "OPTIONAL", mean that an item is Expand
+ truly optional. One vendor may choose to include the item because a
+ particular marketplace requires it or because the vendor feels that
+ it enhances the product while another vendor may omit the same item.
+ An implementation which does not include a particular option MUST be
+ prepared to interoperate with another implementation which does
+ include the option, though perhaps with reduced functionality. In the
+ same vein an implementation which does include a particular option
+ MUST be prepared to interoperate with another implementation which
+ does not include the option (except, of course, for the feature the
+ option provides).
+
+
EID 5101 (Verified) is as follows:
+
+Section: 5
+
+Original Text:
+
+5. MAY This word, or the adjective "OPTIONAL", mean that an item is
+ truly optional. One vendor may choose to include the item because a
+ particular marketplace requires it or because the vendor feels that
+ it enhances the product while another vendor may omit the same item.
+ An implementation which does not include a particular option MUST be
+ prepared to interoperate with another implementation which does
+ include the option, though perhaps with reduced functionality. In the
+ same vein an implementation which does include a particular option
+ MUST be prepared to interoperate with another implementation which
+ does not include the option (except, of course, for the feature the
+ option provides.)
+
+Corrected Text:
+
+5. MAY This word, or the adjective "OPTIONAL", mean that an item is
+ truly optional. One vendor may choose to include the item because a
+ particular marketplace requires it or because the vendor feels that
+ it enhances the product while another vendor may omit the same item.
+ An implementation which does not include a particular option MUST be
+ prepared to interoperate with another implementation which does
+ include the option, though perhaps with reduced functionality. In the
+ same vein an implementation which does include a particular option
+ MUST be prepared to interoperate with another implementation which
+ does not include the option (except, of course, for the feature the
+ option provides).
+
+
Notes:
+Full stop should appear outside the parentheses in the last sentence.
+
+
+6. Guidance in the use of these Imperatives
+
+ Imperatives of the type defined in this memo must be used with care
+ and sparingly. In particular, they MUST only be used where it is
+ actually required for interoperation or to limit behavior which has
+ potential for causing harm (e.g., limiting retransmissions) For Expand Multiple
+
+
EID 494 (Verified) is as follows:
+
+Section: 6
+
+Original Text:
+
+(e.g., limiting retransmisssions)
+
+Corrected Text:
+
+(e.g., limiting retransmissions)
+
+
Notes:
+
+
+
+
EID 496 (Verified) is as follows:
+
+Section: 6
+
+Original Text:
+
+ In particular, they MUST only be used where it is actually required
+ for interoperation or to limit behavior which has potential for
+ causing harm (e.g., limiting retransmisssions) For example, they
+ must not be used to try to impose a particular method on
+ implementors where the method is not required for interoperability.
+
+Corrected Text:
+
+ In particular, they MUST only be used where it is actually required
+ for interoperation or to limit behavior which has potential for
+ causing harm (e.g., limiting retransmissions). For example, they
+ must not be used to try to impose a particular method on
+ implementors where the method is not required for interoperability.
+
+
Notes:
+
+
+
example, they must not be used to try to impose a particular method
+ on implementors where the method is not required for
+ interoperability.
+
+7. Security Considerations
+
+ These terms are frequently used to specify behavior with security
+ implications. The effects on security of not implementing a MUST or
+ SHOULD, or doing something the specification says MUST NOT or SHOULD
+ NOT be done may be very subtle. Document authors should take the time
+ to elaborate the security implications of not following
+ recommendations or requirements as most implementors will not have
+ had the benefit of the experience and discussion that produced the
+ specification.
+
+8. Acknowledgments
+
+ The definitions of these terms are an amalgam of definitions taken
+ from a number of RFCs. In addition, suggestions have been
+ incorporated from a number of people including Robert Ullmann, Thomas
+ Narten, Neal McBurnett, and Robert Elz.
+
+9. Author's Address
+
+ Scott Bradner
+ Harvard University
+ 1350 Mass. Ave.
+ Cambridge, MA 02138
+
+ phone - +1 617 495 3864
+
+ email - sob@harvard.edu
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/website/rfc2119_sigabrt.html b/website/rfc2119_sigabrt.html
new file mode 100644
index 0000000..18be9ac
--- /dev/null
+++ b/website/rfc2119_sigabrt.html
@@ -0,0 +1,312 @@
+
+
+
+
+
+
+
+
+ rfc2119
+
+
+
+
+
+
+
+
+
+
+
+ Network Working Group S. Bradner
+Request for Comments: 2119 Harvard University
+BCP: 14 March 1997
+Category: Best Current Practice
+
+
+ Key words for use in RFCs to Indicate Requirement Levels
+
+Status of this Memo
+
+ This document specifies an Internet Best Current Practices for the
+ Internet Community, and requests discussion and suggestions for
+ improvements. Distribution of this memo is unlimited.
+
+Abstract
+
+ In many standards track documents several words are used to signify
+ the requirements in the specification. These words are often
+ capitalized. This document defines these words as they should be
+ interpreted in IETF documents. Authors who follow these guidelines
+ should incorporate this phrase near the beginning of their document:
+
+ The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL Expand
+ NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT
+ RECOMMENDED", "MAY", and "OPTIONAL" in this document are to
+ be interpreted as described in RFC 2119.
+
+
EID 499 (Verified) is as follows:
+
+Section: Abstract
+
+Original Text:
+
+ The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL
+ NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and
+ "OPTIONAL" in this document are to be interpreted as described in
+ RFC 2119.
+
+Corrected Text:
+
+ The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL
+ NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT
+ RECOMMENDED", "MAY", and "OPTIONAL" in this document are to
+ be interpreted as described in RFC 2119.
+
+
Notes:
+The phrase "NOT RECOMMENDED" is missing from this sentence.
+
+
+ Note that the force of these words is modified by the requirement
+ level of the document in which they are used.
+
+1. MUST This word, or the terms "REQUIRED" or "SHALL", means that the Expand
+ definition is an absolute requirement of the specification.
+
+
EID 493 (Verified) is as follows:
+
+Section: 1
+
+Original Text:
+
+2. MUST NOT This phrase, or the phrase "SHALL NOT", mean that the
+ definition is an absolute prohibition of the specification.
+
+Corrected Text:
+
+2. MUST NOT This phrase, or the phrase "SHALL NOT", means that the
+ definition is an absolute prohibition of the specification.
+
+
Notes:
+
+
+
+
EID 498 (Verified) is as follows:
+
+Section: 1
+
+Original Text:
+
+4. SHOULD NOT This phrase, or the phrase "NOT RECOMMENDED" mean that
+ there may exist valid reasons in particular circumstances when the
+ particular behavior is acceptable or even useful, but the full
+ implications should be understood and the case carefully weighed
+ before implementing any behavior described with this label.
+
+Corrected Text:
+
+4. SHOULD NOT This phrase, or the phrase "NOT RECOMMENDED", means that
+ there may exist valid reasons in particular circumstances when the
+ particular behavior is acceptable or even useful, but the full
+ implications should be understood and the case carefully weighed
+ before implementing any behavior described with this label.
+
+
Notes:
+
+
+
+
EID 500 (Verified) is as follows:
+
+Section: 1
+
+Original Text:
+
+3. SHOULD This word, or the adjective "RECOMMENDED", mean that there
+ may exist valid reasons in particular circumstances to ignore a
+ particular item, but the full implications must be understood and
+ carefully weighed before choosing a different course.
+
+Corrected Text:
+
+3. SHOULD This word, or the adjective "RECOMMENDED", means that there
+ may exist valid reasons in particular circumstances to ignore a
+ particular item, but the full implications must be understood and
+ carefully weighed before choosing a different course.
+
+
Notes:
+
+
+
+
+
EID 495 (Verified) is as follows:
+
+Section: 1
+
+Original Text:
+
+1. MUST This word, or the terms "REQUIRED" or "SHALL", mean that the
+ definition is an absolute requirement of the specification.
+
+
+Corrected Text:
+
+1. MUST This word, or the terms "REQUIRED" or "SHALL", means that the
+ definition is an absolute requirement of the specification.
+
+
Notes:
+
+
+
+2. MUST NOT This phrase, or the phrase "SHALL NOT", mean that the
+ definition is an absolute prohibition of the specification.
+
+3. SHOULD This word, or the adjective "RECOMMENDED", mean that there
+ may exist valid reasons in particular circumstances to ignore a
+ particular item, but the full implications must be understood and
+ carefully weighed before choosing a different course.
+
+4. SHOULD NOT This phrase, or the phrase "NOT RECOMMENDED" mean that
+ there may exist valid reasons in particular circumstances when the
+ particular behavior is acceptable or even useful, but the full
+ implications should be understood and the case carefully weighed
+ before implementing any behavior described with this label.
+
+5. MAY This word, or the adjective "OPTIONAL", mean that an item is Expand
+ truly optional. One vendor may choose to include the item because a
+ particular marketplace requires it or because the vendor feels that
+ it enhances the product while another vendor may omit the same item.
+ An implementation which does not include a particular option MUST be
+ prepared to interoperate with another implementation which does
+ include the option, though perhaps with reduced functionality. In the
+ same vein an implementation which does include a particular option
+ MUST be prepared to interoperate with another implementation which
+ does not include the option (except, of course, for the feature the
+ option provides).
+
+
EID 5101 (Verified) is as follows:
+
+Section: 5
+
+Original Text:
+
+5. MAY This word, or the adjective "OPTIONAL", mean that an item is
+ truly optional. One vendor may choose to include the item because a
+ particular marketplace requires it or because the vendor feels that
+ it enhances the product while another vendor may omit the same item.
+ An implementation which does not include a particular option MUST be
+ prepared to interoperate with another implementation which does
+ include the option, though perhaps with reduced functionality. In the
+ same vein an implementation which does include a particular option
+ MUST be prepared to interoperate with another implementation which
+ does not include the option (except, of course, for the feature the
+ option provides.)
+
+Corrected Text:
+
+5. MAY This word, or the adjective "OPTIONAL", mean that an item is
+ truly optional. One vendor may choose to include the item because a
+ particular marketplace requires it or because the vendor feels that
+ it enhances the product while another vendor may omit the same item.
+ An implementation which does not include a particular option MUST be
+ prepared to interoperate with another implementation which does
+ include the option, though perhaps with reduced functionality. In the
+ same vein an implementation which does include a particular option
+ MUST be prepared to interoperate with another implementation which
+ does not include the option (except, of course, for the feature the
+ option provides).
+
+
Notes:
+Full stop should appear outside the parentheses in the last sentence.
+
+
+6. Guidance in the use of these Imperatives
+
+ Imperatives of the type defined in this memo must be used with care
+ and sparingly. In particular, they MUST only be used where it is
+ actually required for interoperation or to limit behavior which has
+ potential for causing harm (e.g., limiting retransmissions) For Expand Multiple
+
+
EID 494 (Verified) is as follows:
+
+Section: 6
+
+Original Text:
+
+(e.g., limiting retransmisssions)
+
+Corrected Text:
+
+(e.g., limiting retransmissions)
+
+
Notes:
+
+
+
+
EID 496 (Verified) is as follows:
+
+Section: 6
+
+Original Text:
+
+ In particular, they MUST only be used where it is actually required
+ for interoperation or to limit behavior which has potential for
+ causing harm (e.g., limiting retransmisssions) For example, they
+ must not be used to try to impose a particular method on
+ implementors where the method is not required for interoperability.
+
+Corrected Text:
+
+ In particular, they MUST only be used where it is actually required
+ for interoperation or to limit behavior which has potential for
+ causing harm (e.g., limiting retransmissions). For example, they
+ must not be used to try to impose a particular method on
+ implementors where the method is not required for interoperability.
+
+
Notes:
+
+
+
example, they must not be used to try to impose a particular method
+ on implementors where the method is not required for
+ interoperability.
+
+7. Security Considerations
+
+ These terms are frequently used to specify behavior with security
+ implications. The effects on security of not implementing a MUST or
+ SHOULD, or doing something the specification says MUST NOT or SHOULD
+ NOT be done may be very subtle. Document authors should take the time
+ to elaborate the security implications of not following
+ recommendations or requirements as most implementors will not have
+ had the benefit of the experience and discussion that produced the
+ specification.
+
+8. Acknowledgments
+
+ The definitions of these terms are an amalgam of definitions taken
+ from a number of RFCs. In addition, suggestions have been
+ incorporated from a number of people including Robert Ullmann, Thomas
+ Narten, Neal McBurnett, and Robert Elz.
+
+9. Author's Address
+
+ Scott Bradner
+ Harvard University
+ 1350 Mass. Ave.
+ Cambridge, MA 02138
+
+ phone - +1 617 495 3864
+
+ email - sob@harvard.edu
+
+
+
+
+
+
+
\ No newline at end of file