I hereby claim:
- I am yegle on github.
- I am yegle (https://keybase.io/yegle) on keybase.
- I have a public key ASA_sLGmpOa5Duyf2sYyu-22gA5UrZf_4dlrv7FG6619FAo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
$ curl -I https://www.autonomous.ai -H 'accept-language: en,zh-CN;q=0.9,zh;q=0.8' | |
HTTP/2 500 | |
server: nginx | |
date: Wed, 27 May 2020 06:46:20 GMT | |
content-type: text/html; charset=utf-8 | |
content-length: 58788 | |
set-cookie: lang=zh-CN; Max-Age=315360000; Path=/; Expires=Sat, 25 May 2030 06:46:20 GMT | |
access-control-allow-origin: * | |
access-control-allow-methods: GET, POST, OPTIONS, PUT, PATCH, DELETE | |
access-control-allow-headers: X-Requested-With,content-type |
class API(app.page): | |
pass | |
class DjangoAPI(API): | |
model = None | |
def __init__(self): | |
self.qs = self.model.objects | |
self.exclude = [] |
# Caveat: | |
# 1. query_response support regex capture group, but you have to write expect/send in the same YAML item. | |
# 2. When send the "send" line, Blackbox Exporter will automatically add a \n. | |
transmission_rpc: | |
prober: tcp | |
timeout: 30s | |
tcp: | |
query_response: | |
- send: "GET /transmission/rpc/ HTTP/1.1\r\nAuthorization: Basic YOUR_BASIC_AUTH_HEADER\r\n\r" |
This is a brief introduction about how Linux kernel handles the send
system call.
This study is based on kernel version 3.7.2, which is the latest stable kernel when writing this study.
In the latest kernel, the system call is defined using the SYSCALL_DEFINEx
macro, in which x
is the number of arguments. For example, in order to find the definition of asmlinkage long sys_sendto(int, void __user *, size_t, unsigned, struct sockaddr __user *, int);
, you need to grep
for SYSCALL_DEFINE6
because it has 6 arguments.
The definition of the system call send
can be found at net/socket.c
.
def get_readonly_fields(self, request, obj=None): | |
if obj and obj.is_processed: | |
return ('csv_file',) + self.readonly_fields | |
else: | |
return self.readonly_fields |