     }
 }
 
+private extension URLRequest {
+    mutating func applyDefaultMessageSocketSetting() {
+        headers = [
+            commonUserAgentKey: commonUserAgentValue,
+            "Sec-WebSocket-Extensions": "permessage-deflate; client_max_window_bits",
+            "Sec-WebSocket-Protocol": "msg.nicovideo.jp#json"
+        ]
+        timeoutInterval = 10
+    }
+}
+
 // MARK: - Private Methods (Message Socket, TimeShifted)
 private extension NicoManager {
     func openTimeShiftMessageSocket(userId: String, room: WebSocketRoomData, connectContext: NicoConnectContext, completion: @escaping (Result<Void, NicoError>) -> Void) {

        messageSocket = socket
    }

    func resetGoBack() {
        earliestChatDate = .distantFuture
        chatGoBackCount = 0
        chatCountInThreadRequest = 0
        goBackChats.removeAll()
    }

    // swiftlint:disable function_parameter_count function_body_length
    func handleMessageSocketEventForTimeShift(socket: WebSocket, event: WebSocketEvent, userId: String, threadId: String, threadKey: String, completion: (Result<Void, NicoError>) -> Void) {
        log.debug(event)
        switch event {
        case .connected:
            completion(Result.success(()))

            return
        }
        var request = URLRequest(url: url)
        request.applyDefaultMessageSocketSetting()
        let socket = WebSocket(request: request)
        resetTimeShiftVariables()
        socket.onEvent = { [weak self] in
            self?.handleMessageSocketEventForTimeShift(
                socket: socket,
