blob: 357528bab951a752b8af68eab97a37d3a171cd77 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
/*
* Copyright (C) 2015, Google Inc. and others
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Distribution License v. 1.0 which is available at
* https://www.eclipse.org/org/documents/edl-v10.php.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
package org.eclipse.jgit.transport;
/**
* Internal API to assist {@code org.eclipse.jgit.http.server}.
* <p>
* <b>Do not call.</b>
*
* @since 4.0
*/
public class InternalHttpServerGlue {
/**
* Apply a default user agent for a request.
*
* @param up
* current UploadPack instance.
* @param agent
* user agent string from the HTTP headers.
*/
public static void setPeerUserAgent(UploadPack up, String agent) {
up.userAgent = agent;
}
/**
* Apply a default user agent for a request.
*
* @param rp
* current ReceivePack instance.
* @param agent
* user agent string from the HTTP headers.
*/
public static void setPeerUserAgent(ReceivePack rp, String agent) {
rp.userAgent = agent;
}
private InternalHttpServerGlue() {
}
}
|