[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[debbugs-tracker] bug#34855: closed (27.0.50; url-retrieve-synchronously

From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#34855: closed (27.0.50; url-retrieve-synchronously Bad request Error every 2nd call)
Date: Sat, 23 Mar 2019 06:40:01 +0000

Your message dated Sat, 23 Mar 2019 08:39:38 +0200
with message-id <address@hidden>
and subject line Re: bug#34855: 27.0.50; url-retrieve-synchronously Bad request 
Error every 2nd call
has caused the debbugs.gnu.org bug report #34855,
regarding 27.0.50; url-retrieve-synchronously Bad request Error every 2nd call
to be marked as done.

(If you believe you have received this mail in error, please contact

34855: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=34855
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: 27.0.50; url-retrieve-synchronously Bad request Error every 2nd call Date: Thu, 14 Mar 2019 12:01:54 +0100 User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.5.1

When I try to connect to our local gerrit server (https, using a custom
CAcert) every second request fails: (400 bad request error)
When I perform the test in emacs 26.1 (installed via the fedora package
manager) all request are successfull.

This is the script I'm using for my tests:

(require 'auth-source)
(require 'json)
(require 'url)
(require 'url-http)
(require 'url-vars)
(require 'subr-x)

(defcustom ims-gerrit-host "gerrit.ims.co.at"
  "hostname of the gerrit instance"
  :group 'ims-jira
  :type 'string)

(defun ims-gerrit-authentication ()
  "Return an encoded string with jira username and password."
  (let ((pass-entry (auth-source-user-and-password ims-gerrit-host)))

    (if-let ((username (nth 0 pass-entry))
             (password (nth 1 pass-entry)))
         (concat username ":" password)))))

(defun ims-gerrit--get-auth-headers ()
  "Helper function to setup auth header for gerrit url call."
  `(("Content-Type" . "application/x-www-form-urlencoded")
    ("Authorization" .
       "Basic "

(defun ims-gerrit--retrieve-page-as-json (path)
  "Shortcut for gerrit api PATH to return valid json."
  (let ((url-request-extra-headers (ims-gerrit--get-auth-headers)))
    (with-current-buffer (url-retrieve-synchronously
                          (concat "https://"; ims-gerrit-host path))
      (goto-char (point-min))
      (re-search-forward "^$")
      (delete-region (point) (point-min))

      ;; FIXME
      ;; (json-read-from-string (buffer-string)))

(defun gerrit-get-server-version ()
  (switch-to-buffer "*gerritests*")
  (insert (emacs-version))
  (insert ?\n)
  (dolist (loopvar `(0 1 2 3 4 5 6 7 8))
    (insert (format "\n##### %d\n" loopvar))
    (insert (prin1-to-string (ims-gerrit--retrieve-page-as-json

The emacs 27.0 build, where the test fails,  was build be me locally.
Could it be that something between emacs 26.1 and the HEAD of master
broke sth?

This is the ouput I get in emcas 27.0 (as you can see every 2nd request
is empty)

GNU Emacs 27.0.50 (build 99, x86_64-pc-linux-gnu, GTK+ Version 3.24.1)
 of 2019-03-14

##### 0
##### 1
##### 2
##### 3
##### 4
##### 5
##### 6
##### 7
##### 8


In GNU Emacs 27.0.50 (build 99, x86_64-pc-linux-gnu, GTK+ Version 3.24.1)
 of 2019-03-14 built on PC-16609.ims.co.at
Repository revision: 020e69d992c98fd852e835c9bd707a8d137090f2
Repository branch: master
Windowing system distributor 'Fedora Project', version 11.0.12003000
System Description: Fedora 29 (Workstation Edition)

Recent messages:
Mark set
Saving file /home/thomas.hisch/gitrepos/dotfiles/emacs.d/user-lisp/gerrit-urltest.el... Wrote /home/thomas.hisch/gitrepos/dotfiles/emacs.d/user-lisp/gerrit-urltest.el
You can run the command ‘eval-buffer’ with M-x ev-b RET
Contacting host: gerrit.ims.co.at:443
completing-read-default: Command attempted to use minibuffer while in minibuffer
Making completion list... [2 times]
Scanning for dabbrevs...done

Configured using:
 'configure --prefix=/opt/emacs --with-x-toolkit=gtk3 --with-xpm
 --without-jpeg --without-gif --without-tiff'

Configured features:

Important settings:
  value of $LC_CTYPE: en_US.UTF-8
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Fundamental

Minor modes in effect:
  tooltip-mode: t
  global-eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Load-path shadows:
None found.

(shadow sort mail-extr dabbrev emacsbug message dired dired-loaddefs
format-spec rfc822 mml mml-sec epa derived epg epg-config gnus-util
rmail rmail-loaddefs mm-decode mm-bodies mm-encode mailabbrev gmm-utils
mailheader sendmail mail-utils gnutls network-stream url-cache url-http
url-auth mail-parse rfc2231 rfc2047 rfc2045 mm-util ietf-drums
mail-prsvr url-gw nsm rmc puny url url-proxy url-privacy url-expand
url-methods url-history url-cookie url-domsuf url-util url-parse
url-vars mailcap auth-source cl-seq eieio eieio-core cl-macs
eieio-loaddefs password-cache json subr-x map seq byte-opt gv bytecomp
byte-compile cconv cl-loaddefs cl-lib time-date vc-git diff-mode
easymenu easy-mmode elec-pair mule-util tooltip eldoc electric uniquify
ediff-hook vc-hooks lisp-float-type mwheel term/x-win x-win
term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe
tabulated-list replace newcomment text-mode elisp-mode lisp-mode
prog-mode register page menu-bar rfn-eshadow isearch timer select
scroll-bar mouse jit-lock font-lock syntax facemenu font-core
term/tty-colors frame cl-generic cham georgian utf-8-lang misc-lang
vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932
hebrew greek romanian slovak czech european ethiopic indian cyrillic
chinese composite charscript charprop case-table epa-hook jka-cmpr-hook
help simple abbrev obarray minibuffer cl-preloaded nadvice loaddefs
button faces cus-face macroexp files text-properties overlay sha1 md5
base64 format env code-pages mule custom widget hashtable-print-readable
backquote threads dbusbind inotify lcms2 dynamic-setting
system-font-setting font-render-setting move-toolbar gtk x-toolkit x
multi-tty make-network-process emacs)

Memory information:
((conses 16 65737 7435)
 (symbols 48 7667 1)
 (strings 32 23669 1937)
 (string-bytes 1 709583)
 (vectors 16 12492)
 (vector-slots 8 153584 13038)
 (floats 8 25 80)
 (intervals 56 379 0)
 (buffers 992 32))

Diese E-Mail enthaelt vertrauliche und/oder rechtlich geschuetzte Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtuemlich erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail ist nicht gestattet.

This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly prohibited

IMS Nanofabrication GmbH
FN: 208021 p, FB-Gericht: Wien;
Sitz: Schreygasse 3, 1020, Vienna (Austria),Tel. +43 1 214 48 94; E-Mail: address@hidden; DVR-Nr: 0374369; www.ims.co.at

--- End Message ---
--- Begin Message --- Subject: Re: bug#34855: 27.0.50; url-retrieve-synchronously Bad request Error every 2nd call Date: Sat, 23 Mar 2019 08:39:38 +0200
> Cc: address@hidden, address@hidden
> From: Thomas Hisch <address@hidden>
> Date: Fri, 22 Mar 2019 23:42:35 +0100
> On 3/22/19 10:00 PM, Eli Zaretskii wrote:
> >> Cc: address@hidden
> >> From: Thomas Hisch <address@hidden>
> >> Date: Fri, 22 Mar 2019 21:13:32 +0100
> >>
> >> My company surprisingly switched to official (= non self-signed)
> >> certificates last week. I've tested my testcode today again with the
> >> latest HEAD of the master branch and I can no longer reproduce this issue.
> >>
> >> I have no idea why the old self-signed certificates caused an issue that
> >> is fixed by reverting 84613dae5c34ea742dd9a3e56f5acb55f604b483.
> > 
> > So you are saying that we should close this bug report?
> > 
> Yes, IMO you can close it.

Thanks, done.

--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]