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

Fix missing HTTPMessage.getHeader() #1444

Merged
merged 1 commit into from
Dec 11, 2023
Merged

Conversation

runlevel5
Copy link
Contributor

Info

  • Play1 (1.7.1-35-g557a968a)
  • Python 3.7.16

Steps to reproduce:

./play install cas 3.0
~ Will install cas-3.1
~ This module is compatible with: 1.1.x, 1.2.x
~ Do you want to install this version (y/n)? y
~ Installing module cas-3.1...
~
~ Fetching https://www.playframework.com/modules/cas-3.1.zip
Traceback (most recent call last):
  File "./pp/play", line 168, in <module>
    status = cmdloader.commands[play_command].execute(command=play_command, app=play_app, args=remaining_args, env=play_env, cmdloader=cmdloader)
  File "/Users/tle/Work/clui/pp/framework/pym/play/commands/modulesrepo.py", line 67, in execute
    install(app, args, env)
  File "/Users/tle/Work/clui/pp/framework/pym/play/commands/modulesrepo.py", line 476, in install
    Downloader().retrieve(fetch, archive)
  File "/Users/tle/Work/clui/pp/framework/pym/play/commands/modulesrepo.py", line 103, in retrieve
    self.chunk_read(result, destination, report_hook=self.chunk_report)
  File "/Users/tle/Work/clui/pp/framework/pym/play/commands/modulesrepo.py", line 120, in chunk_read
    total_size = response.info().headers['Content-Length'].strip()
AttributeError: 'HTTPMessage' object has no attribute 'headers'

Context

The response.info() returns HTTPMessage object in Python 3 and no longer have the getHeader() method.

@xael-fry xael-fry self-requested a review July 15, 2023 06:08
@xael-fry xael-fry self-requested a review July 15, 2023 06:38
@xael-fry xael-fry merged commit f832ef8 into playframework:master Dec 11, 2023
@xael-fry
Copy link
Member

Merge in master
Thanks @runlevel5

@xael-fry xael-fry added this to the 1.8.0 milestone Dec 11, 2023
@runlevel5 runlevel5 deleted the patch-1 branch December 11, 2023 06:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants