File: //usr/lib/python3/dist-packages/mercurial/__pycache__/wireprotoserver.cpython-310.pyc
o
�]Lb�E � @ s( d dl mZ d dlZd dlZd dlZddlmZ ddlmZm Z m
Z
mZmZm
Z
ddlmZ ddlmZmZ ejZejZejZdZd Zd
ZdZejZdd
� Ze�ej�G dd� de��Zdd� Z dd� Z!dd� Z"dd� Z#dd� Z$dd� Z%dd� Z&e�ej�G dd� de��Z'd d!� Z(G d"d#� d#e�Z)dS )$� )�absolute_importN� )�_)�encoding�error�pycompat�util�wireprototypes�wireprotov1server)r )�compression�
stringutil�� s application/mercurial-0.1s application/mercurial-0.2s application/hg-errorc C sL g }d} | j �d||f �}|du rn
|�t�|�� |d7 }qd�|�S )zjDecode a long value from multiple HTTP request headers.
Returns the value as a bytes, not a str.
r Ts %s-%dN� )�headers�get�appendr �bytesurl�join)�req�headerprefix�chunks�i�v� r �;/usr/lib/python3/dist-packages/mercurial/wireprotoserver.py�decodevaluefromheaders* s �
r c @ sf e Zd Zdd� Zedd� �Zdd� Zdd� Zd d
� Zdd� Z e
jd
d� �Zdd� Z
dd� Zdd� ZdS )�httpv1protocolhandlerc C s || _ || _|| _d | _d S �N)�_req�_ui�
_checkperm�
_protocaps)�selfr �ui� checkpermr r r �__init__= s
zhttpv1protocolhandler.__init__c C s dS )Ns http-v1r �r"