(Packet packet)
| 270 | private Map<Long, Long> groupMap = new HashMap<>(); |
| 271 | |
| 272 | public void setGroupId(Packet packet) throws Exception { |
| 273 | byte[] data = (packet.getDecodedData().length > 0) ? packet.getDecodedData() : packet.getModifiedData(); |
| 274 | Http http = Http.create(data); |
| 275 | String streamIdStr = http.getFirstHeader("x-packetproxy-http3-stream-id"); |
| 276 | if (streamIdStr != null && streamIdStr.length() > 0) { |
| 277 | |
| 278 | long streamId = Long.parseLong(streamIdStr); |
| 279 | if (groupMap.containsKey(streamId)) { |
| 280 | |
| 281 | packet.setGroup(groupMap.get(streamId)); |
| 282 | } else { |
| 283 | |
| 284 | long groupId = UniqueID.getInstance().createId(); |
| 285 | groupMap.put(streamId, groupId); |
| 286 | packet.setGroup(groupId); |
| 287 | } |
| 288 | } |
| 289 | } |
| 290 | |
| 291 | } |
nothing calls this directly
no test coverage detected