unable to recieve api request when using flask api endpoint for content length 0 #5542
Unanswered
NutroUzumaki
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
@app.route("/", methods=["GET", "POST"])
def test():
print("Received POST request")
xml_data = request.data.decode("utf-8")
return xml_data
Frame 449: 217 bytes on wire (1736 bits), 217 bytes captured (1736 bits) on interface \Device\NPF_{0C348CD8-FCF8-4F74-A5C2-71025925AE64}, id 0
Section number: 1
Interface id: 0 (\Device\NPF_{0C348CD8-FCF8-4F74-A5C2-71025925AE64})
Interface name: \Device\NPF_{0C348CD8-FCF8-4F74-A5C2-71025925AE64}
Interface description: Wi-Fi
Encapsulation type: Ethernet (1)
Arrival Time: Aug 6, 2024 11:59:58.775401000 India Standard Time
UTC Arrival Time: Aug 6, 2024 06:29:58.775401000 UTC
Epoch Arrival Time: 1722925798.775401000
[Time shift for this packet: 0.000000000 seconds]
[Time delta from previous captured frame: 0.001284000 seconds]
[Time delta from previous displayed frame: 0.002276000 seconds]
[Time since reference or first frame: 26.993950000 seconds]
Frame Number: 449
Frame Length: 217 bytes (1736 bits)
Capture Length: 217 bytes (1736 bits)
[Frame is marked: False]
[Frame is ignored: False]
[Protocols in frame: eth:ethertype:ip:tcp:http]
[Coloring Rule Name: HTTP]
[Coloring Rule String: http || tcp.port == 80 || http2]
Ethernet II, Src: TPLink_80:b2:27 (30:de:4b:80:b2:27), Dst: Intel_d5:d1:a3 (24:41:8c:d5:d1:a3)
Destination: Intel_d5:d1:a3 (24:41:8c:d5:d1:a3)
Address: Intel_d5:d1:a3 (24:41:8c:d5:d1:a3)
.... ..0. .... .... .... .... = LG bit: Globally unique address (factory default)
.... ...0 .... .... .... .... = IG bit: Individual address (unicast)
Source: TPLink_80:b2:27 (30:de:4b:80:b2:27)
Address: TPLink_80:b2:27 (30:de:4b:80:b2:27)
.... ..0. .... .... .... .... = LG bit: Globally unique address (factory default)
.... ...0 .... .... .... .... = IG bit: Individual address (unicast)
Type: IPv4 (0x0800)
Internet Protocol Version 4, Src: 192.168.0.1, Dst: 192.168.0.112
0100 .... = Version: 4
.... 0101 = Header Length: 20 bytes (5)
Differentiated Services Field: 0x00 (DSCP: CS0, ECN: Not-ECT)
0000 00.. = Differentiated Services Codepoint: Default (0)
.... ..00 = Explicit Congestion Notification: Not ECN-Capable Transport (0)
Total Length: 203
Identification: 0x842d (33837)
010. .... = Flags: 0x2, Don't fragment
0... .... = Reserved bit: Not set
.1.. .... = Don't fragment: Set
..0. .... = More fragments: Not set
...0 0000 0000 0000 = Fragment Offset: 0
Time to Live: 64
Protocol: TCP (6)
Header Checksum: 0x343e [validation disabled]
[Header checksum status: Unverified]
Source Address: 192.168.0.1
Destination Address: 192.168.0.112
Transmission Control Protocol, Src Port: 55678, Dst Port: 7547, Seq: 2654, Ack: 963, Len: 151
Source Port: 55678
Destination Port: 7547
[Stream index: 15]
[Conversation completeness: Complete, WITH_DATA (31)]
..0. .... = RST: Absent
...1 .... = FIN: Present
.... 1... = Data: Present
.... .1.. = ACK: Present
.... ..1. = SYN-ACK: Present
.... ...1 = SYN: Present
[Completeness Flags: ·FDASS]
[TCP Segment Len: 151]
Sequence Number: 2654 (relative sequence number)
Sequence Number (raw): 1783102832
[Next Sequence Number: 2805 (relative sequence number)]
Acknowledgment Number: 963 (relative ack number)
Acknowledgment number (raw): 1513550442
1000 .... = Header Length: 32 bytes (8)
Flags: 0x018 (PSH, ACK)
000. .... .... = Reserved: Not set
...0 .... .... = Accurate ECN: Not set
.... 0... .... = Congestion Window Reduced: Not set
.... .0.. .... = ECN-Echo: Not set
.... ..0. .... = Urgent: Not set
.... ...1 .... = Acknowledgment: Set
.... .... 1... = Push: Set
.... .... .0.. = Reset: Not set
.... .... ..0. = Syn: Not set
.... .... ...0 = Fin: Not set
[TCP Flags: ·······AP···]
Window: 3709
[Calculated window size: 7418]
[Window size scaling factor: 2]
Checksum: 0xf53f [unverified]
[Checksum Status: Unverified]
Urgent Pointer: 0
Options: (12 bytes), No-Operation (NOP), No-Operation (NOP), Timestamps
TCP Option - No-Operation (NOP)
Kind: No-Operation (1)
TCP Option - No-Operation (NOP)
Kind: No-Operation (1)
TCP Option - Timestamps: TSval 17070944, TSecr 265118408
Kind: Time Stamp Option (8)
Length: 10
Timestamp value: 17070944
Timestamp echo reply: 265118408
[Timestamps]
[Time since first frame in this TCP stream: 4.272772000 seconds]
[Time since previous frame in this TCP stream: 0.001284000 seconds]
[SEQ/ACK analysis]
[iRTT: 0.001355000 seconds]
[Bytes in flight: 151]
[Bytes sent since last PSH flag: 151]
TCP payload (151 bytes)
Hypertext Transfer Protocol
POST / HTTP/1.1\r\n
[Expert Info (Chat/Sequence): POST / HTTP/1.1\r\n]
[POST / HTTP/1.1\r\n]
[Severity level: Chat]
[Group: Sequence]
Request Method: POST
Request URI: /
Request Version: HTTP/1.1
Host: 192.168.0.112\r\n
User-Agent: TR069_AGENT/1.0\r\n
Content-Length: 0\r\n
[Content length: 0]
Connection: keep-alive\r\n
Content-Type: text/xml; charset=utf-8\r\n
\r\n
[Full request URI: http://192.168.0.112/]
[HTTP request 2/2]
[Prev request in frame: 369]
this above is a full packet which was displayed in wireshark
but this request never reached my api
Beta Was this translation helpful? Give feedback.
All reactions