CS FundamentalsHardProduct-company placement
A form sends a POST to /old, and the server must redirect it to /new so that the browser repeats the POST with the same body, and the move is permanent. Which status code fits?
- A. 301 Moved Permanently
- B. 303 See Other
- C. 307 Temporary Redirect
- D. 308 Permanent Redirect
Correct answer: D. 308 Permanent Redirect
308 is permanent and forbids changing the method or body. 301 (like 302) historically lets clients turn POST into GET, 303 explicitly tells the client to use GET, and 307 keeps the method but is temporary.
More Computer Networks questions
- A TLS 1.3 client resumes a session and sends application data in 0-RTT (early data). Which statement is correct?
- A developer authenticates API messages as tag = SHA-256(secret ‖ message) instead of using HMAC. Why is this unsafe?
- Two sites connect through a router that performs NAT. An IPsec tunnel using AH fails, while one using ESP with NAT traversal works. Why?
- Asha sends one email with To: Ravi and Bcc: Meena, both at the same domain. How does Meena's server know to deliver a copy to her, given…
- A stateless packet filter at a campus edge allows all outbound TCP, and allows inbound TCP only when the ACK flag is set (so only replies…
- A company wants its bare domain example.com to point at a hosting provider's name, as www.example.com does with a CNAME. Why does standard…