Web Application Basics
Web Application BasicsURLScheme:often httpsUser(rare)Host/Domain:website addresstyposquatting:mimic a website to trick people into giving up sensitive info.Port:usually 80-http,443-httpsPath:file pathQuery String:have ?—Modify-ableFragment—Modify-ableHTTP Request:start line(methods/url path/http version)request headers(host,user-agent,- - - web browserreferer,- - -such as www.google.com,the web where the request comefromcookies,content-type,content-length…)Request Body- - 4kinds:Url encoded(application/x-www-form-urlencoded) ;keyvalueform-data表格数据(multipart/form-data) ;boundary----WebKitFormBoundary7MA4YWxkTrZu0gW- - - 之后为生成的分割头部)json(application/json); { “username”“” }xml(application/xml) ;just like htmlHTTP ResponseThe first linein every HTTP response is called the Status Line. It gives you three key pieces of info:HTTP Version: This tells you which version of HTTP is being used.Status Code: A three-digit number showing the outcome of your request.Reason Phrase: A short message explaining the status code in human-readable terms.Since we already covered HTTP Versions in Task 5, let’s focus on the Status Codes and Reason Phrases here.Status Codes and Reason PhrasesThe Status Code is the number that tells you if the request succeeded or failed, while the Reason Phrase explains what happened. These codes fall into five main categories:Informational Responses (100-199)These codes mean the server has received part of the request and is waiting for the rest. It’s a “keep going” signal.Successful Responses (200-299)These codes mean everything worked as expected. The server processed the request and sent back the requested data.Redirection Messages (300-399)These codes tell you that the resource you requested has moved to a different location, usually providing the new URL.Client Error Responses (400-499)These codes indicate a problem with the request. Maybe the URL is wrong, or you’re missing some required info, like authentication.Server Error Responses (500-599)These codes mean the server encountered an error while trying to fulfil the request. These are usually server-side issues and not the client’s fault.Common Status CodesHere are some of the most frequently seen status codes:100 (Continue)The server got the first part of the request and is ready for the rest.200 (OK)The request was successful, and the server is sending back the requested resource.301 (Moved Permanently)The resource you’re requesting has been permanently moved to a new URL. Use the new URL from now on.404 (Not Found)The server couldn’t find the resource at the given URL. Double-check that you’ve got the right address.500 (Internal Server Error)Something went wrong on the server’s end, and it couldn’t process your request.Response Headerjust headersSecurity Headers1.CSPContent-Security-Policy: default-src ‘self’; script-src ‘self’ https://cdn.tryhackme.com; style-src ‘self’2.HSTSStrict-Transport-Security: max-age63072000; includeSubDomains; preload3.X-Content-Type-OptionsX-Content-Type-Options: nosniff4.Referrer-PolicyThis header controls the amount of information sent to the destination web server when a user is redirected from the source web server, such as when they click a hyperlink. The header is available to allow a web administrator to control what information is shared. Here are some examples of Referrer-Policy:Referrer-Policy: no-referrerReferrer-Policy: same-originReferrer-Policy: strict-originReferrer-Policy: strict-origin-when-cross-originHere’s a breakdown of the Referrer-Policy header by directives:no-referrerThis completely disables any information being sent about the referrersame-originThis policy will only send referrer information when the destination is part of the same origin. This is helpful when you want referrer information passed when hyperlinks are within the same website but not outside to external websites.strict-originThis policy only sends the referrer as the origin when the protocol stays the same. So, a referrer is sent when an HTTPS connection goes to another HTTPS connection.strict-origin-when-cross-originThis is similar to strict-origin except for same-origin requests, where it sends the full URL path in the origin header.THANKS FOR VIEWING!

相关新闻

文件读写全套易错笔记

文件读写全套易错笔记

一、语法类错误(错误代码修正代码) 错误1:fopen不做空指针判断 错误代码 FILE* fp fopen("test.txt","r"); fputc(a,fp); // 打开失败fpNULL,直接崩溃问题:文件打开失败不会捕获,后续…

2026/7/20 16:19:51 阅读更多 →
vla学习笔记(2) lerobot配置gazebo

vla学习笔记(2) lerobot配置gazebo

一、写gazebo.launch.py 直接复制下列文件,并且修改对应的文件名称import os from launch import LaunchDescription from launch.actions import ExecuteProcess, RegisterEventHandler, TimerAction from launch_ros.actions import Node from launch_ros.substit…

2026/7/21 8:08:57 阅读更多 →
概念、概要、详细设计编写心法

概念、概要、详细设计编写心法

一文讲清概念设计、概要设计、详细设计:别再把三种文档写混了设计文档不是越细越好,而是要在正确阶段回答正确问题:概念设计统一业务语言,概要设计搭系统骨架,详细设计画代码施工图。很多研发同学写设计文档时&#xf…

2026/7/20 22:52:40 阅读更多 →

最新新闻

实验室的“可重复性”不只来自实验台,也来自采购单

实验室的“可重复性”不只来自实验台,也来自采购单

实验可重复性是科研的基石。你做的实验,别人能重复;你上次做的,这次能重复。为了这个目标,你严格控制操作流程、校准仪器、标准化样本处理。但有一个影响重复性的变量,经常被排除在控制范围之外——采购。如果两次实验…

2026/7/21 16:00:54 阅读更多 →
Ardupilot仿真中遇到的问题(持续更新)

Ardupilot仿真中遇到的问题(持续更新)

1、如下图所示,提示“Could not find the program [‘arm-none-eabi-ar’] :”   解决方法: (1)、重启电脑 (2)、把 arm-none-eabi-ar下的bin文件夹添加到电脑的环境变量中,然后重启。 2、仿真…

2026/7/21 16:00:54 阅读更多 →
50个Dify工作流模板:AI新手快速上手指南,告别从零开始的烦恼

50个Dify工作流模板:AI新手快速上手指南,告别从零开始的烦恼

50个Dify工作流模板:AI新手快速上手指南,告别从零开始的烦恼 【免费下载链接】Awesome-Dify-Workflow 分享一些好用的 Dify DSL 工作流程,自用、学习两相宜。 Sharing some Dify workflows. 项目地址: https://gitcode.com/GitHub_Trending…

2026/7/21 16:00:54 阅读更多 →
Beam安全最佳实践:如何保护您的隐私资产

Beam安全最佳实践:如何保护您的隐私资产

Beam安全最佳实践:如何保护您的隐私资产 【免费下载链接】beam Beam: Scalable Confidential Cryptocurrency. Leading the way to Confidential DeFi 项目地址: https://gitcode.com/gh_mirrors/bea/beam Beam作为领先的隐私加密货币,提供了强大…

2026/7/21 16:00:54 阅读更多 →
【HAL库】STM32CubeMX开发----STM32F103/F207/F407----目录

【HAL库】STM32CubeMX开发----STM32F103/F207/F407----目录

前期准备----基础资源链接 STM32F4xx系列参考手册(中文版英文版)----点击下载 一、搭建编译环境 Keil5编译环境搭建流程----STM32和GD32 STM32CubeMX 下载和安装----详细教程 STM32CubeMX安装包(Win-6.6.1)----下载链接 二、【HAL库】基础开发 文章链接: 【HAL…

2026/7/21 16:00:54 阅读更多 →
Qt 模型、视图、代理

Qt 模型、视图、代理

提示:文章写完后,目录可以自动生成,如何生成可参考右边的帮助文档 文章目录前言一、MVD的理解二、代码1.实现的功能2.效果3.代码示例总结前言 模型和视图的主要作用就是实现数据显示和存储分离;Qt通过MVD(模型、视图、…

2026/7/21 15:59:52 阅读更多 →

日新闻

Octane Render与C4D汉化版安装与优化指南

Octane Render与C4D汉化版安装与优化指南

1. Octane Render与C4D的黄金组合:为什么选择这个方案?在三维创作领域,渲染器的选择往往决定了作品的最终呈现质量和工作效率。作为Cinema 4D(C4D)用户,Octane Render的GPU加速特性与实时预览功能&#xff…

2026/7/21 0:00:19 阅读更多 →
GPMC接口设计:异步/同步模式与多路复用配置实战

GPMC接口设计:异步/同步模式与多路复用配置实战

1. GPMC接口设计:从硬件连接到软件配置的全局视角在嵌入式系统开发中,尤其是基于TI Sitara系列如AM263x这类高性能微控制器的项目里,外部存储器的扩展几乎是绕不开的一环。无论是存放大量非易失性代码的NOR Flash,还是作为高速数据…

2026/7/21 0:00:19 阅读更多 →
UE5 GAS框架下RPG被动技能系统:从核心原理到实战实现

UE5 GAS框架下RPG被动技能系统:从核心原理到实战实现

1. 项目概述:UE5 GAS RPG被动技能的核心价值在UE5里用GAS(Gameplay Ability System)做RPG游戏,主动技能像是你手里的武器,按一下打一下,逻辑直接,反馈也快。但被动技能,它更像是你身…

2026/7/21 0:00:19 阅读更多 →

周新闻

Go语言静态资源打包方案对比与实践指南

Go语言静态资源打包方案对比与实践指南

1. 项目背景与核心需求在Go语言开发中,我们经常需要处理静态资源文件的打包问题。无论是Web应用的模板文件、前端资源,还是配置文件、证书等,都需要随程序一起分发。传统做法是将这些文件与编译后的二进制文件放在同一目录下,但这…

2026/7/21 8:48:31 阅读更多 →
Go语言实现高性能LDAP认证服务的架构与实践

Go语言实现高性能LDAP认证服务的架构与实践

1. 项目背景与核心价值LDAP(轻量级目录访问协议)作为企业级身份认证的黄金标准,已经服务了超过80%的财富500强公司。我在金融科技领域实施统一认证体系时,发现传统Java方案存在启动慢、内存占用高等痛点。而Go语言凭借其协程并发模…

2026/7/21 5:34:47 阅读更多 →
【AI面试官实战指南】:用ChatGPT模拟10类高频技术岗面试,3天提升应答精准度92%

【AI面试官实战指南】:用ChatGPT模拟10类高频技术岗面试,3天提升应答精准度92%

更多请点击: https://intelliparadigm.com 第一章:AI面试官实战指南的核心价值与适用场景 AI面试官并非替代人类HR的“黑箱工具”,而是以可解释、可审计、可迭代的方式,赋能招聘全链路的关键基础设施。其核心价值在于将主观经验沉…

2026/7/21 8:25:39 阅读更多 →

月新闻