rfc3261_18_3_request function

bool rfc3261_18_3_request()

Implementation

bool rfc3261_18_3_request() {
  int len = Utils.strUtf8Length(message.body!);
  dynamic contentLength = message.getHeader('content-length');

  if (contentLength != null && contentLength is String) {
    contentLength = int.tryParse(contentLength) ?? 0;
  } else {
    contentLength = 0;
  }

  if (len < contentLength) {
    reply(400);

    return false;
  }

  return true;
}