Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

leaveRoom() and leaveGroup() didn't work #35

Closed
readper opened this issue Nov 16, 2016 · 4 comments
Closed

leaveRoom() and leaveGroup() didn't work #35

readper opened this issue Nov 16, 2016 · 4 comments
Assignees
Labels

Comments

@readper
Copy link

readper commented Nov 16, 2016

got 411 bad request from server.
add request body can fix the problem.

LINEBot.php:137
return $this->httpClient->post($this->endpointBase . '/v2/bot/group/' . urlencode($groupId) . '/leave', ["dummy"=>"dummy"]);

LINEBot.php:148
return $this->httpClient->post($this->endpointBase . '/v2/bot/room/' . urlencode($roomId) . '/leave', ["dummy"=>"dummy"]);

@moznion moznion self-assigned this Nov 17, 2016
@moznion moznion added bug and removed bug labels Nov 17, 2016
@moznion
Copy link
Contributor

moznion commented Nov 17, 2016

Thank you for your reporting. However I couldn't reproduce that symptoms.
Could you show us more details (situation, usage and etc.)?

@readper
Copy link
Author

readper commented Nov 17, 2016

Log for the error respond

LINE\LINEBot\Response::__set_state(array(
   'httpStatus' => 411,
   'body' => '<HTML><HEAD>
<TITLE>Bad Request</TITLE>
</HEAD><BODY>
<H1>Bad Request</H1>
Your browser sent a request that this server could not understand.<P>
Reference&#32;&#35;7&#46;2e7145cb&#46;1479391184&#46;1dc0bf2c
</BODY>
</HTML>
',
   'headers' => 
  array (
    'Server' => 'AkamaiGHost',
    'Mime-Version' => '1.0',
    'Content-Type' => 'text/html',
    'Content-Length' => '223',
    'Expires' => 'Thu, 17 Nov 2016 13:59:44 GMT',
    'Cache-Control' => 'max-age=0, no-cache, no-store',
    'Pragma' => 'no-cache',
    'Date' => 'Thu, 17 Nov 2016 13:59:44 GMT',
    'Connection' => 'close',
  ),
))  

and the nslookup result:

C:\Users\Readper>nslookup api.line.me
Default Server:  router.asus.com
Address:  192.168.2.1

Non-authoritative answer: 
Name:    e1102.a1.akamaiedge.net
Address:  104.116.6.166
Aliases:  api.line.me
          api.line.me.akadns.net
          im.api.line.me.edgekey.net

@kazuki-ma
Copy link
Contributor

(update markup of @readper 's comment)

@Vaduz Vaduz closed this as completed in #38 Nov 21, 2016
Vaduz added a commit that referenced this issue Nov 21, 2016
Append `Content-Length: 0` to request header when body of POST is empty
@moznion
Copy link
Contributor

moznion commented Nov 21, 2016

@readper
The latest version 1.2.1 fixes this problem. Thank you for your reporting.

@moznion moznion added the bug label Feb 16, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants