-
-
Notifications
You must be signed in to change notification settings - Fork 645
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
cider-grimoire
displays the entire HTML source
#867
Comments
Could you provide me with a way to reproduce this? |
You can find my emacs setup here. I'm using 24.4 on the latest macos (compiled simply with |
I just tried it on ubuntu 14.04 and it doesn't replicate. I have an older mac and I'll try it there, but it'll take me a couple of days. |
Confirmed. Watching Grimoire's logs while using this feature shows that a text/html request is being made when a text/plain request should be made. Not sure how this happened since this feature was working not long ago. |
Can't imagine how something like this might happen. See the relevant code. |
Hum... watching the logs on the live site rn lemme play with it some |
Okay...
|
Something's screwey here...
the fuck |
@arrdem, thanks for replicating the issue. I don't have access to the grimoire logs :) but I used tcpdump to catch the request in both curl and emacs. When running from emacs the request doesn't seem to include the content type header. Both tcpdump output can be found here. You can view them with I looked at the function at |
My initial guess is that this is an artifact of |
Ok, I did some more experimentation (although I'm not sure what to make of it):
Could it be that somehow the initial byte compile during installation messes up things? |
Can't imagine how something like this could happen, but I guess everything is possible. Is this behaving correctly when you don't byte compile anything? I usually use the melpa package (which gets byte-compiled automatically) and I've never run into this problem. |
I also use melpa. |
Ditto on melpa. |
I also use the melpa package (updated today). When I remove the .elc files from the cider package folder and restart emacs it works. When I use the byte compiled version it only shows html output. |
Confirmed, with MELPA: cider-20141121.1705. $ curl -H "Content-Type: text/plain" grimoire.arrdem.com/1.6.0/clojure.core/conj
<html>
<head><title>301 Moved Permanently</title></head>
<body bgcolor="white">
<center><h1>301 Moved Permanently</h1></center>
<hr><center>nginx/1.4.6 (Ubuntu)</center>
</body>
</html> but $ curl -H "Content-Type: text/plain" conj.io/1.6.0/clojure.core/conj
# 1.6.0 - clojure.core - conj
## Arities
[coll x]
[coll x & xs]
## Documentation
conj[oin]. Returns a new collection with the xs
'added'. (conj nil item) returns (item). The 'addition' may
happen at different 'places' depending on the concrete type.
## User Documentation
No user commentary. Care to add some?
... A change of the code from (defconst cider-grimoire-url "http://grimoire.arrdem.com/") to (defconst cider-grimoire-url "http://conj.io/") fixes the problem. |
Oops. Sorry @pw4ever I was expecting the redirect to be user-transparent. Re-enabling the grimoire subdomain until this patch goes through. |
[Fix #867] Update Grimoire URL to fix (cider-grimoire-lookup) regression due to HTTP 301 (Moved Permanently)
Seems like this issue is back. (see #923) Doing
Based on the resolution last time, maybe it is again dropping the plain-text headers after the redirect? |
@magnars looking at the logs I'd agree with that assessment. The latest version of CIDER works fine. I think what I'll do is hack the Grimoire routes to handle requests from the emacs client differently in my upgrade redirect logic. |
clojure-grimoire/grimoire@bf5e277 Should be fixed now. |
Thank-You this was interesting and enlightening to play with for a little On Mon, Dec 22, 2014 at 6:35 PM, Reid D McKenzie [email protected]
John Boyd |
Grimoire 0.4.5 live, provides special handling for legacy versions of CIDER based on user-agent strings to deliver text pages rather than redirects. I was nice and didn't add a snarky message to upgrade CIDER. @johngit22 Thanks, same to you! |
When running
cider-grimoire
it displays the entire html source, not the rendered html.Using latest from melpa and emacs 24.4.
Thanks in advance.
The text was updated successfully, but these errors were encountered: